(Pdb) c
Try 1 times
date: 2018-02-12, from 北京, to 杭州
Traceback (most recent call last):
File "crawler.py", line 273, in executor
this_train = self.checkTicket(date, fromStation, toStation)
File "crawler.py", line 164, in checkTicket
self.b.add_cookie({'name': '_jc_save_fromStation', 'value': self.station[fromStation]})
File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 872, in add_cookie
self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict})
File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: invalid argument: missing 'value'
(Session info: chrome=63.0.3239.132)
(Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 10.0.16299 x86_64)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "crawler.py", line 323, in
ticket_theif.executor()
File "crawler.py", line 283, in executor
except {IOError, RuntimeError, TypeError, NameError} as e:
TypeError: catching classes that do not inherit from BaseException is not allowed
如下,在输入c后报错,浏览器停留在登录后的初试页面不动
(Pdb) c Try 1 times date: 2018-02-12, from 北京, to 杭州 Traceback (most recent call last): File "crawler.py", line 273, in executor this_train = self.checkTicket(date, fromStation, toStation) File "crawler.py", line 164, in checkTicket self.b.add_cookie({'name': '_jc_save_fromStation', 'value': self.station[fromStation]}) File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 872, in add_cookie self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict}) File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute self.error_handler.check_response(response) File "F:\Application\Python\python35\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: invalid argument: missing 'value' (Session info: chrome=63.0.3239.132) (Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 10.0.16299 x86_64)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "crawler.py", line 323, in
ticket_theif.executor()
File "crawler.py", line 283, in executor
except {IOError, RuntimeError, TypeError, NameError} as e:
TypeError: catching classes that do not inherit from BaseException is not allowed