X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Ffunimation.py;h=1eb528f31f4b908b8d832cfe1fd4e1647ef74058;hb=494ab6db7394b39126d775efe03eb6dab428eff9;hp=d1a95d87f14ab04b893b8cf239c2986ca0b602a4;hpb=7ba71e30fb9ec188d122f79a914f688928e80e91;p=youtube-dl diff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.py index d1a95d87f..1eb528f31 100644 --- a/youtube_dl/extractor/funimation.py +++ b/youtube_dl/extractor/funimation.py @@ -5,7 +5,6 @@ from .common import InfoExtractor from ..utils import ( clean_html, determine_ext, - encode_dict, int_or_none, sanitized_Request, ExtractorError, @@ -54,10 +53,10 @@ class FunimationIE(InfoExtractor): (username, password) = self._get_login_info() if username is None: return - data = urlencode_postdata(encode_dict({ + data = urlencode_postdata({ 'email_field': username, 'password_field': password, - })) + }) login_request = sanitized_Request('http://www.funimation.com/login', data, headers={ 'User-Agent': 'Mozilla/5.0 (Windows NT 5.2; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0', 'Content-Type': 'application/x-www-form-urlencoded' @@ -151,11 +150,9 @@ class FunimationIE(InfoExtractor): errors.append(format_url) continue if determine_ext(format_url) == 'm3u8': - m3u8_formats = self._extract_m3u8_formats( + formats.extend(self._extract_m3u8_formats( format_url + auth_token, display_id, 'mp4', entry_protocol='m3u8_native', - preference=preference, m3u8_id='%s-hls' % funimation_id, fatal=False) - if m3u8_formats: - formats.extend(m3u8_formats) + preference=preference, m3u8_id='%s-hls' % funimation_id, fatal=False)) else: tbr = int_or_none(self._search_regex( r'-(\d+)[Kk]', format_url, 'tbr', default=None))