use browser to get file URL, and leave an error when it needs an age verification
This commit is contained in:
parent
ddda7f88e4
commit
d11084f05e
3 changed files with 57 additions and 38 deletions
|
|
@ -33,3 +33,9 @@ class YoutubeBrowser(BaseBrowser):
|
|||
r'.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
||||
r'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
||||
}
|
||||
|
||||
def get_video_url(self, player_url):
|
||||
self.location(player_url)
|
||||
|
||||
assert self.is_on_page(VideoPage)
|
||||
return self.page.get_video_url()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue