2022-04-11 16:42:54 +00:00
|
|
|
accessing
|
|
|
|
metricsFromNitterHtml: xmlItem
|
|
|
|
|
|
|
|
self metrics
|
|
|
|
at: 'comment'
|
|
|
|
put:
|
|
|
|
(((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item |
|
|
|
|
item asString includesSubstring: 'comment' ]) stringValue
|
|
|
|
trimmed copyReplaceAll: ',' with: '');
|
|
|
|
at: 'retweet'
|
|
|
|
put:
|
|
|
|
(((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item |
|
|
|
|
item asString includesSubstring: 'retweet' ]) stringValue
|
|
|
|
trimmed copyReplaceAll: ',' with: '');
|
|
|
|
at: 'quote'
|
|
|
|
put:
|
|
|
|
(((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item |
|
|
|
|
item asString includesSubstring: 'quote' ]) stringValue trimmed
|
|
|
|
copyReplaceAll: ','
|
|
|
|
with: '');
|
|
|
|
at: 'heart'
|
|
|
|
put:
|
|
|
|
(((xmlItem xpath: '//div[@class="icon-container"]') select: [ :item |
|
|
|
|
item asString includesSubstring: 'heart' ]) stringValue trimmed
|
|
|
|
copyReplaceAll: ','
|
|
|
|
with: '').
|
2022-04-11 19:18:52 +00:00
|
|
|
|
|
|
|
self metadata
|
2022-04-11 16:42:54 +00:00
|
|
|
at: 'pinned'
|
|
|
|
put: (xmlItem xpath: '//div[@class="pinned"]') stringValue trimmed = 'Pinned Tweet'
|