mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Support tweet locations
This commit is contained in:
parent
80d6191e74
commit
f8f4487c33
7 changed files with 34 additions and 5 deletions
|
|
@ -103,3 +103,8 @@ proc getTwitterLink*(path: string; params: Table[string, string]): string =
|
|||
result = $(parseUri("https://twitter.com") / path ? p)
|
||||
if username.len > 0:
|
||||
result = result.replace("/" & username, "")
|
||||
|
||||
proc getLocation*(u: Profile | Tweet): (string, string) =
|
||||
let loc = u.location.split(":")
|
||||
let url = if loc.len > 1: "/search?q=place:" & loc[1] else: ""
|
||||
(loc[0], url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue