summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-02-02 22:04:34 -0600
committerOmar Roth <omarroth@hotmail.com>2018-02-02 22:04:34 -0600
commit2fcdb7f6ecac5ce0d2545180bcbd8abbb94f6bb9 (patch)
tree031fedf28c372cc89f839b4d4a3dfe4c4bed9c43 /src
parent3a546d3030b26224a59c7cbb4b1af19e603ac839 (diff)
downloadinvidious-2fcdb7f6ecac5ce0d2545180bcbd8abbb94f6bb9.tar.gz
invidious-2fcdb7f6ecac5ce0d2545180bcbd8abbb94f6bb9.tar.bz2
invidious-2fcdb7f6ecac5ce0d2545180bcbd8abbb94f6bb9.zip
Partially bypass age-gate
Diffstat (limited to 'src')
-rw-r--r--src/helpers.cr6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers.cr b/src/helpers.cr
index 061d28bd..1ababddf 100644
--- a/src/helpers.cr
+++ b/src/helpers.cr
@@ -88,7 +88,11 @@ def fetch_video(id, client)
info = HTTP::Params.parse(info)
if info["reason"]?
- raise info["reason"]
+ info = client.get("/get_video_info?video_id=#{id}&ps=default&eurl=&gl=US&hl=en").body
+ info = HTTP::Params.parse(info)
+ if info["reason"]?
+ raise info["reason"]
+ end
end
title = info["title"]