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

hi~我是一个正在学习ai的学生,使用您的爬虫爬取baidu图片,特此求助:使用gui方式打开,选取baidu,搜索关键字,点击start,然后就会报错如下 #36

Open
healthybaobao opened this issue Mar 12, 2021 · 8 comments

Comments

@healthybaobao
Copy link

[10:07:57] -e Baidu -d chrome_headless -n 100 -j 50 -o "E:/zb/code/images/mouse" -S "mouse"
[10:07:57] Scraping From Baidu Image Search ...
[10:07:57] Keywords: mouse
[10:07:57] Number: 100
[10:07:57] Face Only: False
[10:07:57] Safe Mode: True
[10:07:57] Query URL: https://image.baidu.com/search/index?tn=baiduimage&word=mouse
[10:07:57] Exception in thread
[10:07:57] Thread-3
[10:07:57] :
[10:07:57] Traceback (most recent call last):
[10:07:57] File "D:\软件\python64\lib\threading.py", line 954, in _bootstrap_inner
[10:07:57] self.run()
[10:07:57] File "D:\软件\python64\lib\threading.py", line 892, in run
[10:07:57] self._target(*self._args, **self.kwargs)
[10:07:57] File "E:\zb\code\Image-Downloader\image_downloader.py", line 50, in main
[10:07:57] crawled_urls = crawler.crawl_image_urls(args.keywords,
[10:07:57] File "E:\zb\code\Image-Downloader\crawler.py", line 325, in crawl_image_urls
[10:07:57] image_urls = baidu_get_image_url_using_api(keywords, max_number=max_number, face_only=face_only,
[10:07:57] File "E:\zb\code\Image-Downloader\crawler.py", line 206, in baidu_get_image_url_using_api
[10:07:57] init_json = json.loads(res.text.replace(r"'", ""), encoding='utf-8', strict=False)
[10:07:57] File "D:\软件\python64\lib\json_init
.py", line 359, in loads
[10:07:57] return cls(**kw).decode(s)
[10:07:57] TypeError
[10:07:57] :
[10:07:57] init() got an unexpected keyword argument 'encoding'
[10:07:57] stopped

@healthybaobao healthybaobao changed the title hi~我是一个正在学习ai的学生,使用您的爬虫爬取baidu图片,特此求助:使用gui方式打开,选取baidu,搜索关键字,点击start,然后就会报错武侠 hi~我是一个正在学习ai的学生,使用您的爬虫爬取baidu图片,特此求助:使用gui方式打开,选取baidu,搜索关键字,点击start,然后就会报错如下 Mar 12, 2021
@Ans0nXD
Copy link

Ans0nXD commented Apr 28, 2021

https://www.pianshen.com/article/59561646121/ 试一试能否有用

@zsr228
Copy link

zsr228 commented Jun 2, 2021

change
init_json = json.loads(res.text.replace(r"'", ""), encoding='utf-8', strict=False)
to
init_json = json.loads(res.text.replace(r"'", ""))

@Lininggggggg
Copy link

改了之后,还是不行啊

@Lininggggggg
Copy link

找到问题了,要改两处
image

@zszaxlywn
Copy link

找到问题了,要改两处image

您好,能帮我看一下是什么问题吗

@Zhangbole1
Copy link

ty!

1 similar comment
@Zhangbole1
Copy link

ty!

@Oneboy77
Copy link

Oneboy77 commented Jan 3, 2023

ok,thank

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

No branches or pull requests

7 participants