mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Add user search
This commit is contained in:
parent
eeae28da0c
commit
30bab22dae
16 changed files with 211 additions and 66 deletions
|
|
@ -86,8 +86,11 @@ proc getName*(profile: XmlNode; selector: string): string =
|
|||
proc getUsername*(profile: XmlNode; selector: string): string =
|
||||
profile.selectText(selector).strip(chars={'@', ' ', '\n'})
|
||||
|
||||
proc getBio*(profile: XmlNode; selector: string): string =
|
||||
profile.selectText(selector).stripText()
|
||||
proc getBio*(profile: XmlNode; selector: string; fallback=""): string =
|
||||
var bio = profile.selectText(selector)
|
||||
if bio.len == 0 and fallback.len > 0:
|
||||
bio = profile.selectText(fallback)
|
||||
stripText(bio)
|
||||
|
||||
proc getAvatar*(profile: XmlNode; selector: string): string =
|
||||
profile.selectAttr(selector, "src").getUserpic()
|
||||
|
|
|
|||
Loading…
Reference in a new issue