mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Attempt to fix occasional cursor error
This commit is contained in:
parent
aa2fed19d7
commit
c09a8d87d9
3 changed files with 9 additions and 5 deletions
|
|
@ -14,10 +14,15 @@ proc genParams*(pars: openarray[(string, string)] = @[]; cursor="";
|
|||
result &= p
|
||||
if ext:
|
||||
result &= ("ext", "mediaStats")
|
||||
if cursor.len > 0:
|
||||
result &= ("cursor", cursor)
|
||||
if count.len > 0:
|
||||
result &= ("count", count)
|
||||
if cursor.len > 0:
|
||||
# The raw cursor often has plus signs, which sometimes get turned into spaces,
|
||||
# so we need to them back into a plus
|
||||
if " " in cursor:
|
||||
result &= ("cursor", cursor.replace(" ", "+"))
|
||||
else:
|
||||
result &= ("cursor", cursor)
|
||||
|
||||
proc genHeaders*(token: Token = nil): HttpHeaders =
|
||||
result = newHttpHeaders({
|
||||
|
|
|
|||
Loading…
Reference in a new issue