From 2655c107edb27039d5554dfdd59c0e17a2020dde Mon Sep 17 00:00:00 2001 From: np1 Date: Tue, 3 Feb 2015 00:22:41 +1100 Subject: [PATCH] Fix endless loop issue (#74) --- pafy/pafy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pafy/pafy.py b/pafy/pafy.py index 359dee3a..6b2a8255 100644 --- a/pafy/pafy.py +++ b/pafy/pafy.py @@ -145,7 +145,8 @@ def get_video_info(video_id, newurl=None): info = parseqs(info) # unicode dict dbg("Fetched video info%s", " (age ver)" if newurl else "") - if info['status'][0] == "fail" and info['errorcode'][0] == '150': + if info['status'][0] == "fail" and info['errorcode'][0] == '150' and \ + "confirm your age" in info['reason'][0]: # Video requires age verification dbg("Age verification video") new.callback("Age verification video")