Comments (1)
오랫동안 잘 써왔는데, korail api가 버전업이 되었는지 다음과 같은 에러가 나오네요ㅠ
KorailError Traceback (most recent call last) ~/Dropbox/Programming/Workspace/korail.py in <module> 24 try: ---> 25 trains = korail.search_train(dep, arr, date, depart_time, include_no_seats=True, passengers=psgrs) 26 #print(trains) ~/anaconda3/lib/python3.7/site-packages/korail2/korail2.py in search_train(self, dep, arr, date, time, train_type, passengers, include_no_seats) 774 --> 775 if self._result_check(j): 776 train_infos = j['trn_infos']['trn_info'] ~/anaconda3/lib/python3.7/site-packages/korail2/korail2.py in _result_check(self, j) 620 else: --> 621 raise KorailError(h_msg_txt, h_msg_cd) 622 else: KorailError: 최신버전으로 업데이트하신 후 이용하여 주십시오. (SUPDATE)
데이터를 api서버에 보낼때 버전도 같이 보내는데 최근에 api를 업데이트하면서 특정 버전 이하는 "최신버전으로 업데이트하신 후 이용하여 주십시오. (SUPDATE)" 이 오류를 내는거 같습니다.
근데 이게 로그인 응답은 또 최신버전으로 바꾸면 오히려 오류를 냅니다.
이점만 유의하면 바로 느낌이 오실겁니다.
다음은 제가 해결한 방법입니다.
korail2.py의 Korail 클래스안의
_device = 'AD'
_version = '190617001' //기존값 '150718001'
_key = 'korail1234567890' //기존값이 아마 korail01234567890이였을 겁니다.
값을 이렇게 바꾸시고
같은 파일의 login 함수의
'Device': self._device,
'Version':'150718001', //기존값 self._version
값을 이렇게 바꾸니 해결되었습니다.
이렇게 수정하니 search_train, login, reserve 함수는 잘 작동했습니다.
다른 함수들은 확인은 안해봤으나 잘 되리라 봅니다.
from korail2.
Related Issues (20)
- readme.rst encoding HOT 2
- Support Python3 HOT 1
- Search for all day. HOT 1
- README에서 How.. 부분 HOT 1
- 일반실, 특실 선택해서 예약하는 option 추가하기 HOT 1
- 더이상 작동을 안합니다.
- 9443포트가 닫혔습니다.
- Time에서의 정확한 내부 동작 구조 HOT 1
- 여러개의 좌석(일반실, 특실, 어른, 아이 선택해서)을 한번에 예약하기 HOT 1
- NoResultsError 에러 발생 특정날짜 (아마도 연휴기간) HOT 4
- 혹시 PyPI에 버전업해서 올려주실 수 있을까요? HOT 1
- `Korail` 클래스의 `_session` 변수가 인스턴스 변수로 선언되어야 할 것 같습니다.
- 결제 API 추가하기 HOT 1
- I made a Streamlit app based on your code
- 로그인 오류 HOT 1
- 로그인 실패 에러 HOT 2
- Result 클래스 리팩토링 HOT 1
- 예약 취소 기능 구현 HOT 1
- mobile API 변경 감지 시스템 구축
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from korail2.