1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-01-28 06:12:48 -05:00

Prevent 403 errors from outdated videos

This commit is contained in:
Zed
2019-12-22 01:45:07 +01:00
parent 7ef3a4faba
commit be15f1b001
3 changed files with 13 additions and 17 deletions

View File

@@ -47,9 +47,8 @@ proc fetchJson*(url: Uri; headers: HttpHeaders): Future[JsonNode] {.async.} =
headers["accept"] = jsonAccept
newClient()
var resp = ""
try:
resp = await client.getContent($url)
let resp = await client.getContent($url)
result = parseJson(resp)
except:
return nil