hacksman / spider_world

🕷spider world with me
340 stars 121 forks source link

用别人的抖音号 一直报video_infos 'NoneType' object is not iterable #25

Open CrazyBalls opened 5 years ago

CrazyBalls commented 5 years ago

None Traceback (most recent call last): File "video_download_run.py", line 38, in douyin_crawl.grab_user_media(sys.argv[-1], "USER_LIKE") File "../www_douyin_com/spiders/douyin_crawl.py", line 110, in grab_user_media hasmore, max_cursor = self.grab_video(user_id, action, content) File "../www_douyin_com/spiders/douyin_crawl.py", line 141, in grab_video for per_video in video_infos: TypeError: 'NoneType' object is not iterable 除了demo提供的抖音号 别的都是不行的 作者方便给个群或者联系方式嘛

hacksman commented 5 years ago

那就是你给的抖音号不正确啊???你确认你拿到的是正确的抖音号吗?

CrazyBalls commented 5 years ago

冯提莫 58958068057 papi酱 84492244869 Traceback (most recent call last): File "video_download_run.py", line 34, in douyin_crawl.grab_user_media(sys.argv[-1], "USER_POST", content='-m') File "../www_douyin_com/spiders/douyin_crawl.py", line 110, in grab_user_media hasmore, max_cursor = self.grab_video(user_id, action, content) File "../www_douyin_com/spiders/douyin_crawl.py", line 124, in grab_video real_url = gen_url(self.token, url, query_params) File "../www_douyin_com/common/utils.py", line 57, in gen_url resp = requests.post(URL.api_sign(token), json={"url": url}).json() File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py", line 348, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4) 发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: hacksman notifications@github.com 发送时间: 2019年5月7日 12:16 收件人: hacksman/spider_world spider_world@noreply.github.com 抄送: CrazyBalls 326676300@qq.com, Author author@noreply.github.com 主题: 回复:[hacksman/spider_world] 用别人的抖音号 一直报video_infos 'NoneType' object is not iterable (#25)

hacksman commented 5 years ago

你需要关注微信公众号:【鸡仔说】,回复关键词"抖音",将 config.py 目录下的 token 值替换成你的 token 值。这一步你没有替换,替换成功了是不会出现这种错误的,还有另外一种可能,就是你的当日次数已经使用完了,你可以第二天试下,就可以拿到对应的 冯提莫 或者 papi酱 的视频了