-
Notifications
You must be signed in to change notification settings - Fork 124
Description
start_url那里我不知道该如何添加,所以直接复制URL后得到如下报错:
Traceback (most recent call last):
File "crawl.py", line 119, in
make_pdf(get_data(start_url))
File "crawl.py", line 34, in get_data
f.write(json.dumps(rsp.json(), indent=2, ensure_ascii=False))
File "C:\anaconda\lib\site-packages\requests\models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "C:\anaconda\lib\json_init_.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\anaconda\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\anaconda\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
请问,这只是因为start_url的问题吗?如果是的话,应该怎么找到精华区的接口呢?麻烦您了