]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/manyvids.py
b94b3c2abe333a2ef194abe2186775b182145b9d
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import int_or_none
8 class ManyVidsIE(InfoExtractor
):
9 _VALID_URL
= r
'(?i)https?://(?:www\.)?manyvids\.com/video/(?P<id>\d+)'
11 'url': 'https://www.manyvids.com/Video/133957/everthing-about-me/',
12 'md5': '03f11bb21c52dd12a05be21a5c7dcc97',
16 'title': 'everthing about me (Preview)',
22 def _real_extract(self
, url
):
23 video_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(url
, video_id
)
27 video_url
= self
._search
_regex
(
28 r
'data-(?:video-filepath|meta-video)\s*=s*(["\'])(?P
<url
>(?
:(?
!\
1).)+)\
1',
29 webpage, 'video URL
', group='url
')
31 title = '%s (Preview
)' % self._html_search_regex(
32 r'<h2
[^
>]+class="m-a-0"[^
>]*>([^
<]+)', webpage, 'title
')
34 like_count = int_or_none(self._search_regex(
35 r'data
-likes
=["\'](\d+)', webpage, 'like count', default=None))
36 view_count = int_or_none(self._html_search_regex(
37 r'(?s)<span[^>]+class="views
-wrapper
"[^>]*>(.+?)</span', webpage,
38 'view count', default=None))
43 'view_count': view_count,
44 'like_count': like_count,