mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
Add a read-only timetable helper that starts a cookie-backed Tmoney session, submits the hidden browser fields required by readAlcnList.do, and parses readSasFeeInf schedule rows into JSON. Constraint: Tmoney returns a generic errorCont page unless bef_Aft_Dvs and req_Rec_Num are posted with the timetable form. Rejected: Browser automation-first lookup | official HTTP flow works when the browser-submitted hidden fields are included. Confidence: high Scope-risk: narrow Directive: Do not automate final card submission or payment from this skill without explicit user confirmation. Tested: python3 -m py_compile intercity-bus-booking/scripts/intercity_bus_search.py; python3 intercity-bus-booking/scripts/intercity_bus_search.py --depart-code 0511601 --arrive-code 2482701 --depart-name 동서울 --arrive-name 속초 --date 20260520 --limit 1; rsync to ~/.claude/skills and ~/.agents/skills; ./scripts/validate-skills.sh; node --test scripts/skill-docs.test.js; npm run lint Not-tested: temporary seat hold, cancellation, card entry, and payment flows
2.5 KiB
2.5 KiB
시외버스 예매 가이드
이 기능으로 할 수 있는 일
- 티머니 시외버스 터미널/노선 후보 확인
- 배차 시간표, 운수사, 잔여석, 요금 확인
- 좌석/요금 단계 진입 가능 여부 확인
- 공식 카드정보 입력 페이지로 handoff
먼저 필요한 것
- 별도 사용자 계정/비밀번호는 기본 조회·좌석 단계에서 필요하지 않음
- 결제는 공식 티머니 시외버스 페이지에서 사용자가 직접 진행
- 브라우저 자동화보다
https://intercitybus.tmoney.co.kr공식 HTTP 흐름을 우선 사용
입력값
- 출발 터미널
- 도착 터미널
- 날짜:
YYYYMMDD - 희망 시간대
- 인원 수와 좌석 선호
기본 흐름
- 쿠키 jar를 만들고 티머니 시외버스 페이지를 열어 세션을 시작한다.
POST /otck/readAlcnList.do로 배차를 조회한다. 이때 브라우저 JS가 붙이는bef_Aft_Dvs=D,req_Rec_Num=10을 반드시 같이 보낸다.- 결과의
readSasFeeInf(...)인자를 파싱해 후보를 정리한다. - 선택 후보는
POST /otck/readSatsFee.do로 좌석/요금 단계 진입을 확인한다. - 사용자가 원하면
POST /otck/readPcpySats.do로 공식 카드정보 입력 페이지에 진입하도록 handoff한다. - 뒤로가기/취소성 이동으로 좌석 선택 단계에 복귀해 임시 선점을 해제할 수 있는지 확인한다.
read-only 조회 helper
python3 intercity-bus-booking/scripts/intercity_bus_search.py \
--depart-code 0511601 \
--arrive-code 2482701 \
--depart-name 동서울 \
--arrive-name 속초 \
--date 20260520
이 helper는 쿠키 세션을 시작하고 공식 배차 조회 POST를 수행한 뒤 출발시각, 운수사, 등급, 요금, 잔여/총 좌석을 JSON으로 출력한다. 임시 좌석 선점이나 결제 단계는 수행하지 않는다.
주의할 점
- 결제 자동화는 포함하지 않는다. 공식 페이지의 결제 직전 단계까지 보조하는 assisted checkout 흐름이다.
- 티머니 시외버스 터미널 코드는 KOBUS 고속버스 코드와 다르므로 혼용하지 않는다.
- 일부 표면은
txbus계열 URL과 연결될 수 있지만, 검증된 기본 URL은intercitybus.tmoney.co.kr이다. - stateless POST보다 쿠키와 referer를 유지하는 흐름이 안정적이다.
bef_Aft_Dvs또는req_Rec_Num을 누락하면 실제 배차가 있어도errorCont가 포함된 일반 오류 페이지가 반환될 수 있다.