]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/yourupload.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import urljoin
8 class YourUploadIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?(?:yourupload\.com/(?:watch|embed)|embed\.yourupload\.com)/(?P<id>[A-Za-z0-9]+)'
11 'url': 'http://yourupload.com/watch/14i14h',
12 'md5': '5e2c63385454c557f97c4c4131a393cd',
16 'title': 'BigBuckBunny_320x180.mp4',
17 'thumbnail': r
're:^https?://.*\.jpe?g',
20 'url': 'http://www.yourupload.com/embed/14i14h',
21 'only_matching': True,
23 'url': 'http://embed.yourupload.com/14i14h',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
30 embed_url
= 'http://www.yourupload.com/embed/%s' % video_id
32 webpage
= self
._download
_webpage
(embed_url
, video_id
)
34 title
= self
._og
_search
_title
(webpage
)
35 video_url
= urljoin(embed_url
, self
._og
_search
_video
_url
(webpage
))
36 thumbnail
= self
._og
_search
_thumbnail
(webpage
, default
=None)
42 'thumbnail': thumbnail
,