Improving nitter user getting pages.
This commit is contained in:
parent
2c61055b38
commit
bcf67809a8
@ -2,7 +2,7 @@ accessing
|
|||||||
collectRawTweetsForPages: anInteger
|
collectRawTweetsForPages: anInteger
|
||||||
|
|
||||||
| pagesDict response |
|
| pagesDict response |
|
||||||
pagesDict := self getPagesContentsUntil: anInteger.
|
pagesDict := self getPagesContentsUpto: anInteger.
|
||||||
response := TweetsCollection new.
|
response := TweetsCollection new.
|
||||||
response query: pagesDict keys.
|
response query: pagesDict keys.
|
||||||
pagesDict keysAndValuesDo: [ :key :rawTweets | | temp |
|
pagesDict keysAndValuesDo: [ :key :rawTweets | | temp |
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
accessing
|
accessing
|
||||||
getPagesContentsUntil: anInteger
|
getPagesContentsUpto: anInteger
|
||||||
"I retroactively get all pages contents until a specified page number.
|
"I retroactively get all pages contents until a specified page number.
|
||||||
|
|
||||||
TO DO: should this be splitted back to two methods, one getting the page urls and other its content?
|
TO DO: should this be splitted back to two methods, one getting the page urls and other its content?
|
||||||
@ -10,9 +10,10 @@ getPagesContentsUntil: anInteger
|
|||||||
response := OrderedDictionary new.
|
response := OrderedDictionary new.
|
||||||
response at: self userNameLink put: self documentTree.
|
response at: self userNameLink put: self documentTree.
|
||||||
previousPageLink := self userNameLink.
|
previousPageLink := self userNameLink.
|
||||||
anInteger - 1 timesRepeat: [
|
anInteger - 1 timesRepeat: [ | pageCursor |
|
||||||
nextPageLink := self userNameLink, (self pageCursorFor:previousPageLink) keys first.
|
pageCursor := self pageCursorFor:previousPageLink.
|
||||||
response at: nextPageLink put: (self pageCursorFor:previousPageLink) values first.
|
nextPageLink := self userNameLink, pageCursor keys first.
|
||||||
|
response at: nextPageLink put: pageCursor values first.
|
||||||
previousPageLink := nextPageLink
|
previousPageLink := nextPageLink
|
||||||
].
|
].
|
||||||
^ response
|
^ response
|
Loading…
Reference in New Issue
Block a user