ブログや他のウェブサイトからすべての投稿を取得するためにグーグルリーダーAPIを使用することを計画しています。しかし、私はすべての投稿を出すのにいくつかの問題があります。私はすでに継続文字列を使用しています。ウェブサイトからは5000を超える投稿があることがわかりましたが、私のコードでは1000の投稿しか取得できません。誰かが私が理由を理解するのを手伝ってくれる?ありがとう。
私のコードは次のとおりです。
class greader(GoogleReader):
def __init__(self):
super(greader,self).__init__()
self.identify(*login_info)
self.login_flag = self.login()
def get_all_entries(self,feed=None,target="all"):
entry_l = []
kwargs = {'feed':feed,'order':CONST.ORDER_REVERSE,'count':800}
if target == 'unread':
kwargs['exclude_target'] = CONST.ATOM_STATE_READ
xml_feed = self.get_feed(**kwargs)
u_entries = xml_feed.get_entries()
entry_l.append(u_entries)
continuation = xml_feed.get_continuation()
kwargs['continuation'] = continuation
while continuation != None:
#rand_int = random.randint(6,11)
#time.sleep(rand_int)
xml_feed = self.get_feed(**kwargs)
u_entries = xml_feed.get_entries()
continuation = xml_feed.get_continuation()
kwargs['continuation'] = continuation
entry_l.append(u_entries)
return entry_l