Tweets scraping: updating from web until the most recently stored.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-05-15 13:51:33 -05:00
parent 9ae819722f
commit 7717f00185

View File

@ -0,0 +1,11 @@
accessing
updatedTweets
| currentTweetsPage response nextPageCursor |
currentTweetsPage := self collectRawTweetsFrom: self userNameLinkWithReplies upToPage: 2.
[ (currentTweetsPage collect: [ :tweet | tweet id ]) includes: self newestTweet id ] whileFalse: [
response addAll: currentTweetsPage.
nextPageCursor := currentTweetsPage nextCursor.
currentTweetsPage := self collectRawTweetsFrom: nextPageCursor upToPage: 2.
].
^ response