mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
parent
d8c8b6696a
commit
83a651e732
3 changed files with 15 additions and 2 deletions
|
|
@ -92,6 +92,14 @@ proc getBio*(profile: XmlNode; selector: string; fallback=""): string =
|
|||
bio = profile.selectText(fallback)
|
||||
stripText(bio)
|
||||
|
||||
proc getLocation*(profile: XmlNode): string =
|
||||
let sel = ".ProfileHeaderCard-locationText"
|
||||
result = profile.selectText(sel).stripText()
|
||||
|
||||
let link = profile.selectAttr(sel & " a", "data-place-id")
|
||||
if link.len > 0:
|
||||
result &= ":" & link
|
||||
|
||||
proc getAvatar*(profile: XmlNode; selector: string): string =
|
||||
profile.selectAttr(selector, "src").getUserpic()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue