Fixing page contents downloader and modifying tweets collection.
This commit is contained in:
parent
a38124638d
commit
b964460fa3
@ -3,9 +3,7 @@ collectRawTweetsUpToPage: anInteger
|
||||
|
||||
| pagesDict response customQuery |
|
||||
pagesDict := self getPagesContentsUpto: anInteger.
|
||||
response := TweetsCollection new
|
||||
messages: OrderedCollection new;
|
||||
yourself.
|
||||
response := TweetsCollection new.
|
||||
customQuery := Dictionary new
|
||||
at: 'parameters' put: pagesDict keys;
|
||||
at: 'date' put: DateAndTime now;
|
||||
@ -19,16 +17,16 @@ collectRawTweetsUpToPage: anInteger
|
||||
tempTweet metadata
|
||||
at: DateAndTime now asString put: key;
|
||||
yourself.
|
||||
response messages add: tempTweet.
|
||||
response add: tempTweet.
|
||||
]
|
||||
].
|
||||
response messages doWithIndex: [ :tweet :i |
|
||||
"response messages doWithIndex: [ :tweet :i |
|
||||
| current previous |
|
||||
current := response messages at: i.
|
||||
i < response messages size ifTrue: [
|
||||
previous := response messages at: i + 1.
|
||||
current timelines
|
||||
at: self userName put: previous id;
|
||||
yourself ]].
|
||||
yourself ]]."
|
||||
^ response.
|
||||
|
@ -13,7 +13,7 @@ getPagesContentsUpto: anInteger
|
||||
anInteger - 1 timesRepeat: [ | pageCursor |
|
||||
pageCursor := self pageCursorFor:previousPageLink.
|
||||
nextPageLink := self userNameLink, '/with_replies', pageCursor keys first.
|
||||
response at: nextPageLink put: pageCursor values first.
|
||||
response at: nextPageLink put: (XMLHTMLParser parse:nextPageLink asUrl retrieveContents).
|
||||
previousPageLink := nextPageLink
|
||||
].
|
||||
^ response
|
@ -1,3 +0,0 @@
|
||||
accessing
|
||||
add: aTweet
|
||||
self messages add: aTweet
|
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
messages
|
||||
^ array ifNil: [ array := OrderedCollection new ]
|
||||
^ array "ifNil: [ array := OrderedCollection new ]"
|
Loading…
Reference in New Issue
Block a user