]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/vshare.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class VShareIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?vshare\.io/[dv]/(?P<id>[^/?#&]+)'
10 'url': 'https://vshare.io/d/0f64ce6',
11 'md5': '16d7b8fef58846db47419199ff1ab3e7',
14 'title': 'vl14062007715967',
18 'url': 'https://vshare.io/v/0f64ce6/width-650/height-430/1',
19 'only_matching': True,
22 def _real_extract(self
, url
):
23 video_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(
26 'https://vshare.io/d/%s' % video_id
, video_id
)
28 title
= self
._html
_search
_regex
(
29 r
'(?s)<div id="root-container">(.+?)<br/>', webpage
, 'title')
30 video_url
= self
._search
_regex
(
31 r
'<a[^>]+href=(["\'])(?P
<url
>(?
:https?
:)?
//.+?
)\
1[^
>]*>[Cc
]lick\s
+here
',
32 webpage, 'video url
', group='url
')