我写了下面的代码来抓取转发:
!twint -u vrajabloo --since 2020-1-1 --retweets -o 20celebrity.txt但在运行时会生成以下错误消息:
Twitter does not return more data, scrape stops here.我搜索了一下,也尝试了一下:
import twint
c = twint.Config()
c.Username = "vrajabloo"
c.Retweets = True
twint.run.Profile(c)但这会产生与上面相同的错误消息。
为什么会发生这种情况,我如何修改我的代码以防止这种情况发生?
发布于 2020-03-04 23:20:32
如果您使用Profile方法来检索tweet,那么目前需要Profile_full选项。如果Profile_full选项未设置为True,则twint将使用一个产生404的URL,这就是为什么您得不到任何结果。
请参阅代码here
import twint
c = twint.Config()
c.Username = "vrajabloo"
c.Retweets = True
c.Profile_full = True # <(==== You are forgetting this configuration option
twint.run.Profile(c)https://stackoverflow.com/questions/60352176
复制相似问题