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
+1 -2
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