Socialmetrica/Socialmetrica.package/NitterUser.class/instance/profileImageUrl.st

7 lines
302 B
Smalltalk

accessing
profileImageUrl
| userFeed |
^ profileImageUrl ifNil: [
userFeed := self rssFeed xmlDocument.
(userFeed xpath: '//div[@class="error-panel"]') size = 1 ifTrue: [ ^ nil].
profileImageUrl := ((self rssFeed xmlDocument xpath: '//image/url') stringValue copyReplaceAll: '%2F' with: '/') ]