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

8 lines
336 B
Smalltalk
Raw Normal View History

accessing
profileImageUrl
2022-06-22 21:47:44 +00:00
| 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