Socialmetrica/Socialmetrica.package/Tweet.class/instance/metadataFromNitterHtml..st

14 lines
498 B
Smalltalk

accessing
metadataFromNitterHtml: xmlItem
self metadata
at: 'pinned'
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;
at: 'quote' put: (((xmlItem xpath:
'//div[@class="tweet-body"]//div[@class="quote quote-big"]//a[@class="quote-link"]')
postCopy asString splitOn: 'href="/') second removeSuffix:
'"/>)')