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

6 lines
320 B
Smalltalk

accessing
profileImageUrl
| documentTree |
documentTree := [ self documentTree ] onErrorDo: [ ^ nil ].
^ profileImageUrl := self class nitterProvider, (((documentTree xpath: '//div[@class="profile-card-info"]//a[@class="profile-card-avatar"]') @ 'href') stringValue copyReplaceAll: '%2F' with: '/') copyWithoutFirst