diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-04-29 04:03:07 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-04-29 04:03:07 +0800 |
commit | 9d8ba307ef18e737efc0be5164b53e0546288a4d (patch) | |
tree | ef2f2dfe88a020b154dc3d1f4cef9ddb1cf56cf3 /youtube_dl/extractor/yourupload.py | |
parent | ec7c1e85e0b26e67752bbd3d25b8d5ed23ae0992 (diff) |
[yourupload] Fix extraction
Diffstat (limited to 'youtube_dl/extractor/yourupload.py')
-rw-r--r-- | youtube_dl/extractor/yourupload.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/youtube_dl/extractor/yourupload.py b/youtube_dl/extractor/yourupload.py index 40fc4165f..2064f4a69 100644 --- a/youtube_dl/extractor/yourupload.py +++ b/youtube_dl/extractor/yourupload.py @@ -16,7 +16,7 @@ class YourUploadIE(InfoExtractor): _TESTS = [ { 'url': 'http://yourupload.com/watch/14i14h', - 'md5': 'bf5c2f95c4c917536e80936af7bc51e1', + 'md5': '5e2c63385454c557f97c4c4131a393cd', 'info_dict': { 'id': '14i14h', 'ext': 'mp4', @@ -38,16 +38,16 @@ class YourUploadIE(InfoExtractor): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') - url = 'http://embed.yucache.net/{0:}'.format(video_id) - webpage = self._download_webpage(url, video_id) + embed_url = 'http://embed.yucache.net/{0:}'.format(video_id) + webpage = self._download_webpage(embed_url, video_id) title = self._og_search_title(webpage) thumbnail = self._og_search_thumbnail(webpage) - url = self._og_search_video_url(webpage) + video_url = self._og_search_video_url(webpage) formats = [{ 'format_id': 'sd', - 'url': url, + 'url': video_url, }] return { @@ -55,4 +55,7 @@ class YourUploadIE(InfoExtractor): 'title': title, 'formats': formats, 'thumbnail': thumbnail, + 'http_headers': { + 'Referer': embed_url, + }, } |