projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec7c1e8
)
[yourupload] Fix extraction
author
Yen Chi Hsuan
<yan12125@gmail.com>
Tue, 28 Apr 2015 20:03:07 +0000
(
04:03
+0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Tue, 28 Apr 2015 20:03:07 +0000
(
04:03
+0800)
youtube_dl/extractor/yourupload.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/yourupload.py
b/youtube_dl/extractor/yourupload.py
index 40fc4165f402722eca38cbfbc7c06cf2e4409a64..2064f4a693481b7fc40ad32c565f36ebc16fa825 100644
(file)
--- 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',
_TESTS = [
{
'url': 'http://yourupload.com/watch/14i14h',
- 'md5': '
bf5c2f95c4c917536e80936af7bc51e1
',
+ 'md5': '
5e2c63385454c557f97c4c4131a393cd
',
'info_dict': {
'id': '14i14h',
'ext': 'mp4',
'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')
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)
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',
formats = [{
'format_id': 'sd',
- 'url': url,
+ 'url':
video_
url,
}]
return {
}]
return {
@@
-55,4
+55,7
@@
class YourUploadIE(InfoExtractor):
'title': title,
'formats': formats,
'thumbnail': thumbnail,
'title': title,
'formats': formats,
'thumbnail': thumbnail,
+ 'http_headers': {
+ 'Referer': embed_url,
+ },
}
}