Giter Site home page Giter Site logo

Comments (4)

Alfred1984 avatar Alfred1984 commented on July 1, 2024

哪个项目?

from interesting-python.

belingud avatar belingud commented on July 1, 2024

爬虫爬取微博表情包的项目,Weibo_Comment_Pics

from interesting-python.

taopin avatar taopin commented on July 1, 2024

需要在get_m_url()函数中加上utf8才能顺利执行起来,如下:
headers = {'Cookie': cookie.encode('utf-8')}

然后我可以顺利抓取到第一页的数据和图片,但是到第二页就遇到了上面同样的JSONDecodeError错误,详情见下:
============ RESTART: C:\weibo\photo_clawler.py ============
对应的手机网页端id是:4333xxx50xxx4xxx
模拟登录手机网页端微博成功!
成功抓取第1页的图片链接!
Traceback (most recent call last):
File "C:\weibo\photo_clawler.py", line 151, in
com.get_comments(max_page=20)
File "C:\weibo\photo_clawler.py", line 91, in get_comments
max_id = response.json()['data']['max_id']
File "C:\Python\Python37\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Python\Python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Python\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python\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)

from interesting-python.

liangzhongkai avatar liangzhongkai commented on July 1, 2024

from interesting-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.