]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/yourupload.py
4e25d6f22312a0dca9f1997baa3bacd1c3fd263d
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class YourUploadIE(InfoExtractor
):
8 _VALID_URL
= r
'''(?x)https?://(?:www\.)?
9 (?:yourupload\.com/watch|
10 embed\.yourupload\.com|
12 )/(?P<id>[A-Za-z0-9]+)
16 'url': 'http://yourupload.com/watch/14i14h',
17 'md5': '5e2c63385454c557f97c4c4131a393cd',
21 'title': 'BigBuckBunny_320x180.mp4',
22 'thumbnail': 're:^https?://.*\.jpe?g',
26 'url': 'http://embed.yourupload.com/14i14h',
27 'only_matching': True,
30 'url': 'http://embed.yucache.net/14i14h?client_file_id=803349',
31 'only_matching': True,
35 def _real_extract(self
, url
):
36 video_id
= self
._match
_id
(url
)
38 embed_url
= 'http://embed.yucache.net/{0:}'.format(video_id
)
39 webpage
= self
._download
_webpage
(embed_url
, video_id
)
41 title
= self
._og
_search
_title
(webpage
)
42 video_url
= self
._og
_search
_video
_url
(webpage
)
43 thumbnail
= self
._og
_search
_thumbnail
(webpage
, default
=None)
49 'thumbnail': thumbnail
,