2022-04-11 16:42:54 +00:00
|
|
|
accessing
|
|
|
|
metricsFromNitterHtml: xmlItem
|
2022-04-18 23:44:52 +00:00
|
|
|
|
2022-04-12 15:15:24 +00:00
|
|
|
"TO DO: Metrics scrapping are not consistent.
|
|
|
|
Most times they store numbers, but sometimes, retweets store a userName"
|
2022-04-18 23:44:52 +00:00
|
|
|
|
|
|
|
self metrics
|
|
|
|
at: 'comment' put: (((xmlItem xpath:
|
|
|
|
'//div[@class="tweet-stats"]//div[@class="icon-container"]')
|
|
|
|
select: [ :item | item asString includesSubstring: 'comment' ])
|
|
|
|
stringValue trimmed copyReplaceAll: ',' with: '');
|
|
|
|
at: 'retweet' put: (((xmlItem xpath:
|
|
|
|
'//div[@class="tweet-stats"]//div[@class="icon-container"]')
|
|
|
|
select: [ :item | item asString includesSubstring: 'retweet' ])
|
|
|
|
stringValue trimmed copyReplaceAll: ',' with: '');
|
|
|
|
at: 'quote' put: (((xmlItem xpath:
|
|
|
|
'//div[@class="tweet-stats"]//div[@class="icon-container"]')
|
|
|
|
select: [ :item | item asString includesSubstring: 'quote' ])
|
|
|
|
stringValue trimmed copyReplaceAll: ',' with: '');
|
|
|
|
at: 'heart' put: (((xmlItem xpath:
|
|
|
|
'//div[@class="tweet-stats"]//div[@class="icon-container"]')
|
|
|
|
select: [ :item | item asString includesSubstring: 'heart' ])
|
|
|
|
stringValue trimmed copyReplaceAll: ',' with: '').
|
|
|
|
self metadataFromNitterHtml: xmlItem
|