[英]Is there a way to search for Top tweets with tweepy instead of latest tweets?
[英]Is there a way to have tweepy search method to not truncate tweets
所以目前我正在嘗試使用 python 庫 tweepy 從 Twitter 收集推文。 但是,我在下面的代碼中遇到了一個問題,它給我帶來了所有被截斷的推文。 我想知道是否有辦法讓它給我帶來完整的推文。
tweets = tweepy.Cursor(api.search, q = str(searchTerms), lang = 'en', count = 300, since_id = lastTweetId).items()
for tweet in tweets:
print(tweet.text)
順便說一句,我確實看到這個print api.get_status('862328512405004288', tweet_mode='extended')._json['full_text']
但我使用的方法沒有推文模式參數。 感謝您的幫助,我找到了答案,但是 tweepy api 並不太清楚,這就是我感到困惑的原因
tweets = tweepy.Cursor(api.search, q = str(searchTerms), lang = 'en', count = 300, since_id = lastTweetId, tweet_mode="extended")
tweets = tweepy.Cursor(api.search, q = str(searchTerms), lang = 'en', count = 300, since_id = lastTweetId, tweet_mode="extended")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.