Starting support for Nitter data ( https://nitter.net ).

This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-12-26 14:00:40 -05:00
parent 8325ec0e2a
commit 679e33318f

View File

@ -0,0 +1,9 @@
accessing
fromNitterProfile: userNameString
| rssFeed title |
rssFeed := RSSTools createRSSFeedFor: 'https://nitter.net/', userNameString, '/rss'.
title := rssFeed requiredItems title.
name := (title splitOn: '/') first trimmed.
"Tecnically we could just do 'userName' = 'userNameString'. But we want to capture also how it is expressed in the RSS."
userName := ((title splitOn: '/') second trimmed) allButFirst. "Taking out the '@' sign."
profileImageUrl := (rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/'.