X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fadultswim.py;h=a00bfcb35fc8f61b2192592a57776921d0dee9f6;hb=bd9820c937be846e0e1067395fbf133102c45e79;hp=ca1bfbdc2225b4d79aaac19eafaaa86808dd103e;hpb=b1d65c33695feec76a801b7647fe8077869c25ad;p=youtube-dl diff --git a/youtube_dl/extractor/adultswim.py b/youtube_dl/extractor/adultswim.py index ca1bfbdc2..a00bfcb35 100644 --- a/youtube_dl/extractor/adultswim.py +++ b/youtube_dl/extractor/adultswim.py @@ -57,8 +57,6 @@ class AdultSwimIE(InfoExtractor): ] } - _available_formats = ['150', '640', '3500'] - _video_extensions = { '3500': 'flv', '640': 'mp4', @@ -78,7 +76,7 @@ class AdultSwimIE(InfoExtractor): webpage = self._download_webpage(url, video_path) episode_id = self._html_search_regex(r'', webpage, 'episode_id') - title = self._html_search_regex(r'', webpage, 'title') + title = self._og_search_title(webpage) index_url = 'http://asfix.adultswim.com/asfix-svc/episodeSearch/getEpisodesByIDs?networkName=AS&ids=%s' % episode_id idoc = self._download_xml(index_url, title, 'Downloading episode index', 'Unable to download episode index') @@ -112,7 +110,8 @@ class AdultSwimIE(InfoExtractor): 'format_id': '%s-%s' % (bitrate, type), 'url': file_el.text, 'ext': self._video_extensions.get(bitrate, 'mp4'), - 'tbr': bitrate, + # The bitrate may not be a number (for example: 'iphone') + 'tbr': int(bitrate) if bitrate.isdigit() else None, 'height': height, 'width': width })