diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index c95f79b2..a5ea012c 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -67,7 +67,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale) itct = body.match(/itct=(?[^"]+)"/).not_nil!["itct"] ctoken = body.match(/'COMMENTS_TOKEN': "(?[^"]+)"/) - if body.match(//) + if body.match(//) && !body.match(/player-age-gate-content\">/) bypass_channel = Channel({String, HTTPClient, HTTP::Headers} | Nil).new proxies.each do |proxy_region, list| @@ -79,7 +79,7 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale) proxy_headers["Cookie"] = response.cookies.add_request_headers(headers)["cookie"] proxy_html = response.body - if !proxy_html.match(//) + if !proxy_html.match(//) && !proxy_html.match(/player-age-gate-content\">/) bypass_channel.send({proxy_html, proxy_client, proxy_headers}) else bypass_channel.send(nil)