mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Implement requested changes
This commit is contained in:
parent
8f65bd583d
commit
baf5bf89e7
4 changed files with 8 additions and 3 deletions
|
|
@ -133,6 +133,12 @@ proc getTombstone*(js: JsonNode): string =
|
|||
result = js{"tombstoneInfo", "richText", "text"}.getStr
|
||||
result.removeSuffix(" Learn more")
|
||||
|
||||
proc getSource*(js: JsonNode): string =
|
||||
let
|
||||
raw_src = js["source"].getStr
|
||||
src = raw_src.substr(raw_src.find('>') + 1, raw_src.rfind('<') - 1)
|
||||
return src
|
||||
|
||||
proc extractSlice(js: JsonNode): Slice[int] =
|
||||
result = js["indices"][0].getInt ..< js["indices"][1].getInt
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue