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

9 lines
275 B
Smalltalk
Raw Normal View History

accessing
url
^ url ifNil: [ | temp |
temp := ((self documentTree xpath: '//div[@class="profile-website"]') // 'a' @@ 'href') first.
temp ifNil: [ ^ url := nil ].
temp := temp replaceAll: with: $u.
temp := temp replaceAll: with: $i.
url := temp asUrl.
]