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

8 lines
336 B
Smalltalk

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