我是编码初学者。
我正在尝试从 Twitter 帐户中抓取推文。
运行代码时出现以下错误:CRITICAL:root:twint.get:User:
这是我正在运行的代码:
import twint
config = twint.Config()
# Search tweets tweeted by user 'BarackObama'
config.Username = "BarackObama"
# Limit search results to 20
config.Limit = 20
# Return tweets that were published after Jan 1st, 2020
config.Since = "2020-01-1 20:30:15"
# Formatting the tweets
config.Format = "Tweet Id {id}, tweeted at {time}, {date}, by {username} says: {tweet}"
# Storing tweets in a csv file
config.Store_csv = True
config.Output = "Barack Obama"
twint.run.Search(config)
这个错误是否意味着 Twint 有问题,还是我的代码有错误?
谢谢!
最佳答案
我也是一个初学者,正在尝试学习 Python 作为巴西数字历史的工具。
我遇到了同样的问题(仅在使用 c.Username 参数时)。
我解决了运行 pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
我希望它对你有用。
关于python - CRITICAL :root:twint. 得到什么 :User: Error mean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63006722/