Comments (6)
由于Chrome的驱动只支持linux、mac、Windows,所以你在手机上是运行不了的。我这个星期天去看看怎么移植到nodejs上,这样在手机上也能跑了,可能遍历会很慢。
from jdbrandmember.
好的,谢谢大神!
from jdbrandmember.
请问大神,nodejs有没有可能实现?我跑了一下最新版,还是chromedriver的问题。
python3 main.py
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
Exception in thread Thread-2:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
self.run()
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
Exception in thread Thread-4:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Exception in thread Thread-1:
Traceback (most recent call last):
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
Exception in thread Thread-3:
Traceback (most recent call last):
self._target(*self._args, **self._kwargs)
Exception in thread Thread-5:
Traceback (most recent call last):
self._target(*self._args, **self._kwargs)
self.run()
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
self.run()
2021-04-24 12:42:01 ERROR 浏览器错误 请检查你的驱动和配置
self._target(*self._args, **self._kwargs)
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
browser.get("https://www.jd.com/")
self.run()
Exception in thread Thread-6:
AttributeError: 'NoneType' object has no attribute 'get'
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
browser.get("https://www.jd.com/")
self._target(self._args, **self._kwargs)
self.run()
AttributeError: 'NoneType' object has no attribute 'get'
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
File "/data/data/com.termux/files/usr/lib/python3.9/threading.py", line 892, in run
self._target(self._args, **self._kwargs)
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
browser.get("https://www.jd.com/")
self._target(self._args, **self._kwargs)
AttributeError: 'NoneType' object has no attribute 'get'
browser.get("https://www.jd.com/")
browser.get("https://www.jd.com/")
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 192, in traversals
AttributeError: 'NoneType' object has no attribute 'get'
AttributeError: 'NoneType' object has no attribute 'get'
browser.get("https://www.jd.com/")
AttributeError: 'NoneType' object has no attribute 'get'
正在执行:0.00000%[->*******************************************************************]此次运行获得0京豆运行结束
from jdbrandmember.
我尝试着在手机上使用nodejs puppeteer好像还是不兼容等下星期我考完试了我会再研究研究的
from jdbrandmember.
谢谢!
from jdbrandmember.
大神,你好
想尝试在termux上跑这个脚本,但失败了,可能是没有安装或者说没有正确识别google driver有关。错误如下:
运行python3 main.py
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'drivers/chromedriver'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 254, in
browser = getBrowser(headless=False)
File "/data/data/com.termux/files/home/JDBrandMember/main.py", line 224, in getBrowser
_browser = webdriver.Chrome(executable_path="drivers/chromedriver", options=chrome_options)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home因不便用电脑,想问下,有没有可能在终端里跑这个脚本,谢谢!
抱歉,我即便使用puppeteer
也无法在termux
上运行,可能是我技术不过关😭,所以我没法弄了。如果你不便使用电脑跑脚本的话,我可以给你跑
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.