Skip to content

Commit

Permalink
Fix endless loop issue (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
np1 committed Feb 2, 2015
1 parent e9572af commit 2655c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pafy/pafy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2655c10

Please sign in to comment.