fix login on youtube (closes #918)
This commit is contained in:
parent
9aeb7c67ed
commit
2dd4e8b9b9
1 changed files with 4 additions and 4 deletions
|
|
@ -36,8 +36,8 @@ class YoutubeBrowser(BaseBrowser):
|
|||
r'https?://.*youtube\.com/index\?ytsession=.+': ForbiddenVideoPage,
|
||||
r'https?://.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
|
||||
r'https?://.*youtube\.com/verify_controversy\?next_url(?P<next_url>.+)': VerifyControversyPage,
|
||||
r'https?://accounts\.youtube\.com/accounts/SetSID.*': LoginRedirectPage,
|
||||
r'https?://www.google.com/accounts/ServiceLogin.*': LoginPage,
|
||||
r'https?://accounts.google.com/ServiceLogin.*': LoginPage,
|
||||
r'https?://accounts.google.fr/accounts/SetSID.*': LoginRedirectPage,
|
||||
}
|
||||
|
||||
def is_logged(self):
|
||||
|
|
@ -45,11 +45,11 @@ class YoutubeBrowser(BaseBrowser):
|
|||
return logged
|
||||
|
||||
def login(self):
|
||||
self.location('https://www.google.com/accounts/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US<mpl=sso')
|
||||
self.location('https://accounts.google.com/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US<mpl=sso')
|
||||
self.page.login(self.username, self.password)
|
||||
|
||||
def get_video_url(self, player_url):
|
||||
self.location(player_url)
|
||||
self.location(player_url + '&has_verified=1')
|
||||
|
||||
assert self.is_on_page(VideoPage)
|
||||
return self.page.get_video_url()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue