X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Ftwitch.py;h=023911c41f4b05ef0a8137e9cf8fede2cc94cf6d;hb=ed1269000f24a6ddc683a295ff402ef3ded5c4fb;hp=a2b6a35aa3c89c9ff7c40c5c3385a285abc9a0e5;hpb=be612d9e0c485915f12b8165fc1a0187f29afda8;p=youtube-dl diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index a2b6a35aa..023911c41 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -12,9 +12,11 @@ from ..compat import ( compat_urllib_parse, compat_urllib_parse_urlparse, compat_urllib_request, + compat_urlparse, ) from ..utils import ( ExtractorError, + int_or_none, parse_duration, parse_iso8601, ) @@ -26,7 +28,7 @@ class TwitchBaseIE(InfoExtractor): _API_BASE = 'https://api.twitch.tv' _USHER_BASE = 'http://usher.twitch.tv' _LOGIN_URL = 'https://secure.twitch.tv/login' - _LOGIN_POST_URL = 'https://passport.twitch.tv/authorize' + _LOGIN_POST_URL = 'https://passport.twitch.tv/authentications/new' _NETRC_MACHINE = 'twitch' def _handle_error(self, response): @@ -69,8 +71,15 @@ class TwitchBaseIE(InfoExtractor): 'password': password.encode('utf-8'), }) + post_url = self._search_regex( + r'