Twint: CRITICAL:root:twint.feed:Follow:IndexError for any call

use*_*353 2 python twitter exception

import twint
import os, requests, re, time

c = twint.Config()
c.Username = <anyusername> #Replace with an actual uname in quotes
c.Store_object = True
c.Limit = 10
try:
    twint.run.Followers(c)
except:
    print("Unexpected error:", sys.exc_info()[0])
f = twint.output.follows_list
print(f)
Run Code Online (Sandbox Code Playgroud)

输出

CRITICAL:root:twint.feed:Follow:IndexError
[]
Run Code Online (Sandbox Code Playgroud)

完成了

pip install twint
pip install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint  
Run Code Online (Sandbox Code Playgroud)

谷歌搜索,很多人都遇到过这个错误 - 但我真的找不到解决方案

运行 twint 命令行也会出现同样的错误

twint -u <uname> --followers
CRITICAL:root:twint.feed:Follow:IndexError
Run Code Online (Sandbox Code Playgroud)

这不仅是追随者。我尝试任何操作,都会遇到类似的错误。

在 Windows 10
Twint上运行 Python 3.8.1 - 最新版本 - 2.1.21

J. *_*old 11

旧版移动 Twitter 版本将于 2020 年 12 月 15 日关闭。(M2 移动网站)

这是关于最近关闭M2 移动网络(“旧版”) Twitter 版本的 Reddit 帖子的标题;从今天起 Twitter 将只支持这些浏览器

如果您查看TwintGitHub 存储库

_usr.followers = int(ur['data']['user']['legacy']['followers_count'])
Run Code Online (Sandbox Code Playgroud)

...它使用该legacy属性,因此从 2020 年 12 月 15 日起将无法使用。

GitHub 存储库的贡献者 @himanshudabas在对相同问题回复中也提到了这一点:

那是因为 twitter 在 12 月 15 日杀死了 twitter 的 no js(移动版)版本。使用该版本刮掉了追随者。


不是唯一面临此问题的人(显然),不幸的是,对于 Twint 模块,没有解决方法 (目前?)

说到当前情况,您需要使用官方 Twitter API 或替代包装器/非官方 API。