From 2fcdb7f6ecac5ce0d2545180bcbd8abbb94f6bb9 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 2 Feb 2018 22:04:34 -0600 Subject: [PATCH] Partially bypass age-gate --- src/helpers.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helpers.cr b/src/helpers.cr index 061d28bd5..1ababddf9 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"]