HeroadZ / panda-bamboos-rank

python crawl for panda bamboos rank
8 stars 5 forks source link

运行 panda_crawler.py 报错 #2

Open seuplus opened 7 years ago

seuplus commented 7 years ago

OSX,Python3, mongod 启动成功。试了好几次都这样,不知道什么原因。

大奶强
Misaya若风lol
熊猫官方-LCK直播间
解说JY
基辅特锦赛1
LaoX2333
熊猫Tv丶狮子汪
瓦莉拉的小伙伴
北望你的涵丶丶
君克解说
伍声2009
泡面王子
LPL熊猫官方直播
浅笑萌萌哒
太原马超
抽风Crazy
少帮主
东二梦想
洪湖小肖户外打野
暴雪游戏频道
熊猫丶浩哥户外
榴莲游戏厅
Traceback (most recent call last):
  File "/Users/Macbook/Desktop/panda-bamboos-rank-master/program/v1/panda_crawler.py", line 89, in <module>
    main()
  File "/Users/Macbook/Desktop/panda-bamboos-rank-master/program/v1/panda_crawler.py", line 82, in main
    roomInfoList = getBambooAndName(HotList)
  File "/Users/Macbook/Desktop/panda-bamboos-rank-master/program/v1/panda_crawler.py", line 24, in getBambooAndName
    info = (requests.get(prefix + str(u))).json()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 866, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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)
[Finished in 3.4s with exit code 1]
HeroadZ commented 7 years ago

我觉得是不是主播使用了某个特殊字符?你可以先看一下访问那个api得到的数据是怎样的,打印出来看看