mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Use "max_position" instead of "after" for compat
This commit is contained in:
parent
381a8a106c
commit
211b086f4d
10 changed files with 17 additions and 40 deletions
|
|
@ -12,12 +12,6 @@ const
|
|||
"verified", "safe"
|
||||
]
|
||||
|
||||
# Experimental, this might break in the future
|
||||
# Till then, it results in shorter urls
|
||||
const
|
||||
posPrefix = "thGAVUV0VFVB"
|
||||
posSuffix = "EjUAFQAlAFUAFQAA"
|
||||
|
||||
template `@`(param: string): untyped =
|
||||
if param in pms: pms[param]
|
||||
else: ""
|
||||
|
|
@ -105,12 +99,3 @@ proc genQueryUrl*(query: Query): string =
|
|||
|
||||
if params.len > 0:
|
||||
result &= params.join("&")
|
||||
|
||||
proc cleanPos*(pos: string): string =
|
||||
pos.multiReplace((posPrefix, ""), (posSuffix, ""))
|
||||
|
||||
proc genPos*(pos: string): string =
|
||||
if pos.len == 0 or pos == "0": return pos
|
||||
result = posPrefix & pos
|
||||
if "A==" notin result:
|
||||
result &= posSuffix
|
||||
|
|
|
|||
Loading…
Reference in a new issue