Comments (12)
你用的python
是否为ubuntu
自带的?
我在deepin
下测试并没有这个报错。
不过ctypes
是无关紧要的,我已经将一些函数去掉了,应该可以运行。修改后的文件已附上,替换原有的main.py
即可
main.py
from jdbrandmember.
谢谢您的帮忙,已经更换了main.py,产生了新的报错,这个python3是系统自带的,升级到了3.9.4
日志已生成,查看./logs/ Some log data is being generated: ./log/ ...正在关闭,不要退出
Traceback (most recent call last):
File "/root/jd/ht/main.py", line 72, in get_browser
return webdriver.Chrome(executable_path=get_file_path("drivers/chromedriver"), desired_capabilities={},
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in init
RemoteWebDriver.init(
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/jd/ht/main.py", line 374, in
main()
File "/root/jd/ht/main.py", line 324, in main
add_cookie()
File "/root/jd/ht/main.py", line 85, in add_cookie
browser = get_browser(False)
File "/root/jd/ht/main.py", line 77, in get_browser
raise WebDriverException
selenium.common.exceptions.WebDriverException: Message: None
from jdbrandmember.
之前的版本是可以运行的,这是运行在vps上,没有图形界面,只有文字终端,我想是不是这个原因,无法在第一步跳出浏览器?
from jdbrandmember.
之前的版本是可以运行的,这是运行在vps上,没有图形界面,只有文字终端,我想是不是这个原因,无法在第一步跳出浏览器?
我刚刚也在想你是否用的是无图形界面的
如果你用的是无图形界面的,你需要先在本地配置完config.json
上传上去,防止远程启动浏览器登录
from jdbrandmember.
如果你的服务器核心/带宽比较少的话,thread
建议设置为4以下
from jdbrandmember.
还是不行,已经把config放进去
[root@jindou-xianggang ht]# python3 main.py
验证账号1中,中途退出可能会误认为账号失效而删除
日志已生成,查看./logs/ Some log data is being generated: ./log/ ...正在关闭,不要退出
Traceback (most recent call last):
File "/root/jd/ht/main.py", line 374, in
main()
File "/root/jd/ht/main.py", line 326, in main
check_user()
File "/root/jd/ht/main.py", line 300, in check_user
_browser.add_cookie(cookie)
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 894, in add_cookie
self.execute(Command.ADD_COOKIE, {'cookie': cookie_dict})
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/python3/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidCookieDomainException: Message: invalid cookie domain: Cookie 'domain' mismatch
(Session info: headless chrome=90.0.4430.93)
[root@jindou-xianggang ht]#
from jdbrandmember.
你的服务器是否不在**大陆?
在境外登录京东会自动跳转到对应的境外京东页面
使用这个Main.py可能会解决问题
from jdbrandmember.
谢谢AotonVanke大神的帮助,虽然服务网在香港,确实是这个问题
咱们可以实现静默运行吗,每次运行的时候即使把config文件导入进入后运行,还是依然需要选择,终端需要一直连接上去
以前的版本我都是用nohup命令丢在后台自己跑
from jdbrandmember.
谢谢AotonVanke大神的帮助,虽然服务网在香港,确实是这个问题
咱们可以实现静默运行吗,每次运行的时候即使把config文件导入进入后运行,还是依然需要选择,终端需要一直连接上去
以前的版本我都是用nohup命令丢在后台自己跑
我已经在尝试将selenium
转向更简单的requests
了,虽然直接的访问可能会被黑号
后续会有直接运行的,且不需要浏览器驱动了
from jdbrandmember.
完整版shopid可以提供一份吗~AotonVanke大神
from jdbrandmember.
期待您的更新
from jdbrandmember.
完整版shopid可以提供一份吗~AotonVanke大神
是50万的那个吗,你可以看看提交记录#4de8dbc7e0bc748feddcb07574e77daaeca91454前几版的就是的,后来我重新遍历了一遍才这么少了,主要是好多店铺没有店铺会员
from jdbrandmember.
Related Issues (20)
- win10系统出错 HOT 3
- 退会及TG电报群的一些问题 HOT 10
- 一个提醒和一个问题 HOT 1
- UnicodeDecodeError: 出现编码错误'gbk' codec can't decode byte …… HOT 1
- 这个脚本是不是太猛了点。。。。 HOT 2
- 新版本点那个main.exe闪退啊 HOT 6
- 程式運行時有顯示獲取京豆,但實際沒有增加 HOT 2
- 5.31号更新还是打开闪退
- 进程异常卡住 HOT 18
- config.yaml设置京豆阈值后闪退,无法正常遍历所有店铺 HOT 6
- 增加开卡速度config HOT 1
- No module named 'yaml',提示找不到这个模块 HOT 2
- 什么时候更新shopId呢 HOT 1
- 尝试多个店铺,但是都没有获取到京东,是黑号了吗 HOT 3
- cookie 失效 HOT 1
- 京豆值,没有变化 HOT 1
- 配置binary参数后,ChromeDriver报错
- 换了俩号都是0,现在是不能用了吗? HOT 8
- 11 HOT 1
- 获取线上 shopid 失败
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 jdbrandmember.