Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adapt to Google page updates #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MuLoo
Copy link

@MuLoo MuLoo commented Apr 16, 2024

描述

谷歌图片搜索页面更新,原有的元素查找方式失效。更新了页面元素查找方式。
增加了resolve_dependencies方法中的一行注释,提醒用户在报错时尝试修复(比如我的Mac M1 需要注释掉才能工作)。
PyQt5 从 5.15.9版本更新到 5.15.10

类型

  • Bug修复 (非破坏性更改,修复了一个问题)

如何测试

  • 启动页面,使用谷歌下载
  • 命令行进行谷歌下载

检查单

  • 我的代码遵循了项目的代码风格
  • 我已经对我的代码进行了自我审查
  • 我已经添加了所有必要的注释
  • 我已经检查并确保测试通过

@caomuxifeng
Copy link

[22:31:50] -e Google -d chrome_headless -n 100 -j 50 -o "./download_images/Apple" -S "Apple+"
[22:31:50] Checking Google Chrome and chromedriver ...
[22:31:50] OK.
[22:31:50] Scraping From Google Image Search ...
[22:31:50] Keywords: Apple+
[22:31:50] Number: 100
[22:31:50] Face Only: False
[22:31:50] Safe Mode: True
[22:31:50] Query URL: https://www.google.com/search?tbm=isch&hl=en&q=Apple%2B&safe=on&tbs=
[22:31:51] Exception in thread
[22:31:51] Thread-1
[22:31:51] :
[22:31:51] Traceback (most recent call last):
[22:31:51] File "D:\Anoconda\envs\zihao\lib\threading.py", line 932, in _bootstrap_inner
[22:31:51] self.run()
[22:31:51] File "D:\Anoconda\envs\zihao\lib\threading.py", line 870, in run
[22:31:51] self._target(*self._args, **self._kwargs)
[22:31:51] File "G:\conda执行文件夹\Image-Downloader-master\image_downloader.py", line 63, in main
[22:31:51] crawled_urls = crawler.crawl_image_urls(args.keywords,
[22:31:51] File "G:\conda执行文件夹\Image-Downloader-master\crawler.py", line 362, in crawl_image_urls
[22:31:51] driver = webdriver.Chrome(chrome_path, chrome_options=chrome_options)
[22:31:51] File "D:\Anoconda\envs\zihao\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 80, in init
[22:31:51] super().init(
[22:31:51] File "D:\Anoconda\envs\zihao\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 101, in init
[22:31:51] self.service.start()
[22:31:51] File "D:\Anoconda\envs\zihao\lib\site-packages\selenium\webdriver\common\service.py", line 90, in start
[22:31:51] self._start_process(self.path)
[22:31:51] File "D:\Anoconda\envs\zihao\lib\site-packages\selenium\webdriver\common\service.py", line 203, in _start_process
[22:31:51] self.process = subprocess.Popen(
[22:31:51] File "D:\Anoconda\envs\zihao\lib\subprocess.py", line 858, in init
[22:31:51] self._execute_child(args, executable, preexec_fn, close_fds,
[22:31:51] File "D:\Anoconda\envs\zihao\lib\subprocess.py", line 1251, in _execute_child
[22:31:51] args = list2cmdline(args)
[22:31:51] File "D:\Anoconda\envs\zihao\lib\subprocess.py", line 553, in list2cmdline
[22:31:51] for arg in map(os.fsdecode, seq):
[22:31:51] File "D:\Anoconda\envs\zihao\lib\os.py", line 818, in fsdecode
[22:31:51] filename = fspath(filename) # Does type-checking of filename.
[22:31:51] TypeError
[22:31:51] :
[22:31:51] expected str, bytes or os.PathLike object, not NoneType
[22:31:52] stopped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants