X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fgeneric.py;h=babd581eaadf7d2e0dce3e623aad7f7ed748e119;hb=8c25f81beea169c9d6540eea1a6f71dc045da6ed;hp=51dbbc8db13fb680822eac81b526e7397d18b6d2;hpb=23be51d8ce132dbb967f460e1225fdaaa43dff39;p=youtube-dl diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 51dbbc8db..babd581ea 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -7,11 +7,12 @@ import re from .common import InfoExtractor from .youtube import YoutubeIE -from ..utils import ( +from ..compat import ( compat_urllib_parse, compat_urlparse, compat_xml_parse_error, - +) +from ..utils import ( determine_ext, ExtractorError, float_or_none, @@ -325,7 +326,7 @@ class GenericIE(InfoExtractor): 'ext': 'mp4', 'age_limit': 18, 'uploader': 'www.handjobhub.com', - 'title': 'Busty Blonde Siri Tit Fuck While Wank at Handjob Hub', + 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com', } }, # RSS feed @@ -389,8 +390,35 @@ class GenericIE(InfoExtractor): 'title': 'Conversation about Hexagonal Rails Part 1 - ThoughtWorks', 'duration': 1715.0, 'uploader': 'thoughtworks.wistia.com', - }, + }, + }, + # Direct download with broken HEAD + { + 'url': 'http://ai-radio.org:8000/radio.opus', + 'info_dict': { + 'id': 'radio', + 'ext': 'opus', + 'title': 'radio', + }, + 'params': { + 'skip_download': True, # infinite live stream + }, + 'expected_warnings': [ + r'501.*Not Implemented' + ], }, + # Soundcloud embed + { + 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/', + 'info_dict': { + 'id': '174391317', + 'ext': 'mp3', + 'description': 'md5:ff867d6b555488ad3c52572bb33d432c', + 'uploader': 'Sophos Security', + 'title': 'Chet Chat 171 - Oct 29, 2014', + 'upload_date': '20141029', + } + } ] def report_following_redirect(self, new_url): @@ -544,7 +572,7 @@ class GenericIE(InfoExtractor): self._downloader.report_warning('Falling back on generic information extractor.') if full_response: - webpage = _webpage_read_content(url, video_id) + webpage = self._webpage_read_content(full_response, url, video_id) else: webpage = self._download_webpage(url, video_id) self.report_extraction(video_id) @@ -823,7 +851,7 @@ class GenericIE(InfoExtractor): # Look for embeded soundcloud player mobj = re.search( - r'