From 679e33318fd60f0e9f41d58e814d54b43e8e523a Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sun, 26 Dec 2021 14:00:40 -0500 Subject: [PATCH] Starting support for Nitter data ( https://nitter.net ). --- .../TwitterUser.class/instance/fromNitterProfile..st | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Datanalitica.package/TwitterUser.class/instance/fromNitterProfile..st diff --git a/Datanalitica.package/TwitterUser.class/instance/fromNitterProfile..st b/Datanalitica.package/TwitterUser.class/instance/fromNitterProfile..st new file mode 100644 index 0000000..ebcb157 --- /dev/null +++ b/Datanalitica.package/TwitterUser.class/instance/fromNitterProfile..st @@ -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: '/'.