-1
我想拉取所有比某個max_id更早的推文。但是,我無法弄清楚在我的請求中添加max_id的位置,以便推送比指定推文更早的推文。我想在不改變計數的情況下做到這一點。這裏是我到目前爲止的代碼:如何將max_id添加到我的twitter(tweepy)請求中? (Python 2.7)
import requests
import time
import json
import urllib
import urllib2
import datetime
import tweepy
ct = "INSERT CONSUMER TOKEN"
cs = "INSERT CONSUMER SECRET"
at = "INSERT ACCESS TOKEN"
acs = "INSERT CONSUMER SECRET"
count = 1
twitter = "transportgovuk"
consumer_token = ct
consumer_secret = cs
access_token = at
access_secret = acs
auth = tweepy.OAuthHandler(consumer_token,consumer_secret)
auth.set_access_token(access_token,access_secret)
api = tweepy.API(auth)
max_id = "724916468975046656"
for status in tweepy.Cursor(api.user_timeline,twitter).items(count):
print status
有不改變計數指定max_id後直接拉鳴叫的一種方式?