12306
12306 copied to clipboard
chromium求大神帮忙
刷新间隔: 随机(1-3S) 僵尸票关小黑屋时长: 5 下单接口: 2 下单模式: 2 预售踩点时间:13:00:00
cookie获取中 Traceback (most recent call last): File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/home/ubuntu/anaconda3/lib/python3.7/subprocess.py", line 775, in init restore_signals, start_new_session) File "/home/ubuntu/anaconda3/lib/python3.7/subprocess.py", line 1522, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 20, in
config中chrome driver没填
ok找到错误,没仔细看config
请问解决了吗,我填完之后,又出现Permission Error
我使用的版本是: Google Chrome 77.0.3865.75 ChromeDriver 77.0.3865.40 在config/getCookie.py添加 from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("start-maximized"); options.add_argument("disable-infobars"); options.add_argument("--disable-extensions"); options.add_argument("--disable-gpu"); options.add_argument("--disable-dev-shm-usage"); options.add_argument("--no-sandbox"); options.add_argument("--headless"); cookies = [] driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH, options=options)
cookie获取中
init cookie
/usr/bin/chromedriver
Traceback (most recent call last):
File "run.py", line 20, in
CHROME_PATH配置的不对吧,或者没下载Google Chrome 77.0.3865.75-ChromeDriver 77.0.3865.40
https://hub.docker.com/r/joyzoursky/python-chromedriver;用这个基础镜像吧
首先谢谢 phperfan 大侠的帮助很好的完成了 Using TensorFlow backend. 问题。 pip install numpy==1.16.4 和 pip install setuptools==41.0.1,但运行run.py 后 就出现下述的 AttributeError: module 'TickerConfig' has no attribute 'CHROME_PATH'新问题, 求解?昨天只成功了一次,并买到一张票了。 之后就一直无法下单, 最后我今天再次下载testerSunshine 的master 再试,发现如下问题( 我的chrome 升级为版本 77.0.3865.90(正式版本))
cookie获取中 Traceback (most recent call last): File "C:\Users\jayso\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "C:\Users\jayso\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in init restore_signals, start_new_session) File "C:\Users\jayso\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 20, in
Repl Closed
刷新间隔: 随机(1-3S) 僵尸票关小黑屋时长: 5 下单接口: 2 下单模式: 2 预售踩点时间:13:00:00
cookie获取中 Traceback (most recent call last): File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/home/ubuntu/anaconda3/lib/python3.7/subprocess.py", line 775, in init restore_signals, start_new_session) File "/home/ubuntu/anaconda3/lib/python3.7/subprocess.py", line 1522, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "run.py", line 20, in run() File "run.py", line 8, in run select_ticket_info.select().main() File "/home/ubuntu/super_packet/super_pocket/12306/init/select_ticket_info.py", line 155, in main getDrvicesID(self) File "/home/ubuntu/super_packet/super_pocket/12306/config/getCookie.py", line 17, in getDrvicesID driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH) File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: '' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
问题解决了吗?我安装了chromedriver,还是报同样的errno 13
看样子我也是这个问题~~~0~0
COOKIE_TYPE =1 改成2 能用了~~~啦啦啦~
麻烦您打包发个你改好能用 了的Code我试对比一下吧。谢谢
发自我的 iPhone
在 2019年9月25日,下午5:17,wendao-liurenchao <[email protected]mailto:[email protected]> 写道:
COOKIE_TYPE =1 改成2 能用了~~~啦啦啦~
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/testerSunshine/12306/issues/396?email_source=notifications&email_token=AH2JLI2DFDAE7R7HJ3YZ5V3QLMUCHA5CNFSM4IXZCIT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7RGR7I#issuecomment-534931709, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH2JLI2JOTJIJ5ZQIWJH5ZLQLMUCHANCNFSM4IXZCITQ.
下载了安装了chromedriver,也配置了目录如下,还是会报错啊
COOKIE_TYPE = 1
如果COOKIE_TYPE=1,则需配置
路径,下载地址http://chromedriver.storage.googleapis.com/index.html
chromedriver配置版本只要和chrome的大版本匹配就行
CHROME_PATH = "C:/Users/AppData/Local/Google/Chrome/Application"
url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 cookie获取中 Traceback (most recent call last): File "D:\Anaconda\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "D:\Anaconda\lib\subprocess.py", line 775, in init restore_signals, start_new_session) File "D:\Anaconda\lib\subprocess.py", line 1178, in _execute_child startupinfo) PermissionError: [WinError 5] 拒绝访问。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 20, in
服务器那边接口改了,代码没更新
rainFogWindSnow [email protected] 于2019年12月10日周二 下午10:35写道:
下载了安装了chromedriver,也配置了目录如下,还是会报错啊
COOKIE_TYPE = 1 如果COOKIE_TYPE=1,则需配置 路径,下载地址 http://chromedriver.storage.googleapis.com/index.html chromedriver配置版本只要和chrome的大版本匹配就行
CHROME_PATH = "C:/Users/AppData/Local/Google/Chrome/Application"
url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 url: /otn/leftTicket/init返回参数为空, 接口状态码: 302 cookie获取中 Traceback (most recent call last): File "D:\Anaconda\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start stdin=PIPE) File "D:\Anaconda\lib\subprocess.py", line 775, in init restore_signals, start_new_session) File "D:\Anaconda\lib\subprocess.py", line 1178, in _execute_child startupinfo) PermissionError: [WinError 5] 拒绝访问。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "run.py", line 20, in run() File "run.py", line 8, in run select_ticket_info.select().main() File "E:\python\12306\init\select_ticket_info.py", line 156, in main getDrvicesID(self) File "E:\python\12306\config\getCookie.py", line 17, in getDrvicesID driver = webdriver.Chrome(executable_path=TickerConfig.CHROME_PATH) File "D:\Anaconda\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in init self.service.start() File "D:\Anaconda\lib\site-packages\selenium\webdriver\common\service.py", line 88, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'Application' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/testerSunshine/12306/issues/396?email_source=notifications&email_token=AAMJUXLLYIMRQRRK6ZKS2F3QX6SK3A5CNFSM4IXZCIT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGPODYA#issuecomment-564060640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMJUXORRNMGGM7SHOYVADTQX6SK3ANCNFSM4IXZCITQ .
-- Karl Lok, Thanks and Best regards
CHROME_PATH中需要填写chromedriver.exe的完整路径,不是chrome.exe的路径,比如: c:/tools/google/chromedriver.exe,我也被原始的TickerConfig.py中的配置给误导了。chromedriver.exe可以从作者给的官方链接中下载。
chmod +x webdriver