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

招聘网站爬取全部报错 #117

Open
maqiuoo opened this issue May 7, 2024 · 0 comments
Open

招聘网站爬取全部报错 #117

maqiuoo opened this issue May 7, 2024 · 0 comments

Comments

@maqiuoo
Copy link

maqiuoo commented May 7, 2024

前程无忧:
Traceback (most recent call last):
File "D:\AAAGDproject\ZhaopinCrawler\findjob.py", line 33, in
QCWY(city=city, keyword=keyword).run()
File "D:\AAAGDproject\ZhaopinCrawler\core\QCWY.py", line 92, in run
self._get_max_page()
File "D:\AAAGDproject\ZhaopinCrawler\core\QCWY.py", line 43, in _get_max_page
max_page = html.xpath('//*[@id="resultList"]/div[2]/div[5]/text()')[2][3:]
IndexError: list index out of range

Boss:获取为空

智联:
Traceback (most recent call last):
File "D:\AAAGDproject\ZhaopinCrawler\findjob.py", line 37, in
ZhiLian(city=city, keyword=keyword).run()
File "D:\AAAGDproject\ZhaopinCrawler\core\zhilian.py", line 93, in run
data = self.Spider()
File "D:\AAAGDproject\ZhaopinCrawler\core\zhilian.py", line 48, in Spider
data = req.json()['data']['results']
File "D:\AAAGDproject\ZhaopinCrawler\venv\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "E:\Python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "E:\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "E:\Python37\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

进程已结束,退出代码1

拉勾:
Traceback (most recent call last):
File "D:\AAAGDproject\ZhaopinCrawler\findjob.py", line 39, in
LaGou(city=city, keyword=keyword).run()
File "D:\AAAGDproject\ZhaopinCrawler\core\lagou.py", line 67, in run
self.Spider()
File "D:\AAAGDproject\ZhaopinCrawler\core\lagou.py", line 37, in Spider
text = req.json()
File "D:\AAAGDproject\ZhaopinCrawler\venv\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "E:\Python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "E:\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "E:\Python37\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

进程已结束,退出代码1

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

1 participant