Creating replies download and recognition from nitter html.

This commit is contained in:
ruidajo 2022-04-18 15:53:57 -05:00
parent 49d5529934
commit ad592beaf8
2 changed files with 6 additions and 4 deletions

View File

@ -8,11 +8,11 @@ getPagesContentsUpto: anInteger
| response nextPageLink previousPageLink |
response := OrderedDictionary new.
response at: self userNameLink put: self documentTree.
previousPageLink := self userNameLink.
response at: (self userNameLink, '/with_replies') put: self documentTree.
previousPageLink := (self userNameLink, '/with_replies').
anInteger - 1 timesRepeat: [ | pageCursor |
pageCursor := self pageCursorFor:previousPageLink.
nextPageLink := self userNameLink, pageCursor keys first.
nextPageLink := self userNameLink, '/with_replies', pageCursor keys first.
response at: nextPageLink put: pageCursor values first.
previousPageLink := nextPageLink
].

View File

@ -21,4 +21,6 @@ metricsFromNitterHtml: xmlItem
stringValue trimmed copyReplaceAll: ',' with: '').
self metadata
at: 'pinned'
put: (xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed = 'Pinned Tweet'
put: (xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed = 'Pinned Tweet';
at: 'replie to'
put: (xmlItem xpath: '//div[@class="tweet-body"]//div[@class="replying-to"]') stringValue trimmed.