【问题标题】:tweepy error while getting tweets获取推文时出现 tweepy 错误
【发布时间】:2013-01-01 09:02:38
【问题描述】:

我正在通过 tweepy 收集大量推文, 但过了一会儿,它会停止并显示以下消息:

  File "build/bdist.macosx-10.8-intel/egg/tweepy/binder.py", line 185, in _call
  File "build/bdist.macosx-10.8-intel/egg/tweepy/binder.py", line 168, in execute
tweepy.error.TweepError: [{'message': 'Sorry, that page does not exist', 'code': 34}]

我只收集对已有推文的回复,

所以我猜是回复者拼错了原始推文的作者的情况..

是否有解决方法可以忽略这一点并继续?

【问题讨论】:

    标签: tweets tweepy


    【解决方案1】:

    我自己想通了。 这太简单了.. 您可以尝试/排除并传递错误。

    try:
            # do something                                    
    except tweepy.error.TweepError:
            pass
    

    【讨论】:

    • 您确认是因为用户名拼写错误吗?
    猜你喜欢
    • 2015-04-27
    • 2022-01-09
    • 1970-01-01
    • 2015-01-05
    • 2016-12-11
    • 2022-01-15
    • 2020-12-26
    • 2022-11-19
    • 1970-01-01
    相关资源
    最近更新 更多