diff --git a/Socialmetrica.package/Tweet.class/class/fromUserName.andId..st b/Socialmetrica.package/Tweet.class/class/fromUserName.andId..st new file mode 100644 index 0000000..e47a342 --- /dev/null +++ b/Socialmetrica.package/Tweet.class/class/fromUserName.andId..st @@ -0,0 +1,12 @@ +accessing +fromUserName: twitterName andId: numericString + | tweet | + tweet := self new. + ^ Tweet storedInstances detect: [ :each | each id = numericString ] + ifNone: [ | tweetUrl xmlTweet | + tweetUrl := NitterUser nitterProvider, twitterName, '/status/', numericString. + xmlTweet := (NitterUser new documentTreeFor: tweetUrl) + xpath: '//div[@class="main-tweet"]'. + ^ xmlTweet + ]. + \ No newline at end of file