]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/tube8.py
7 from .keezmovies
import KeezMoviesIE
10 class Tube8IE(KeezMoviesIE
):
11 _VALID_URL
= r
'https?://(?:www\.)?tube8\.com/(?:[^/]+/)+(?P<display_id>[^/]+)/(?P<id>\d+)'
13 'url': 'http://www.tube8.com/teen/kasia-music-video/229795/',
14 'md5': '65e20c48e6abff62ed0c3965fff13a39',
17 'display_id': 'kasia-music-video',
19 'description': 'hot teen Kasia grinding',
20 'uploader': 'unknown',
21 'title': 'Kasia music video',
24 'categories': ['Teen'],
28 'url': 'http://www.tube8.com/shemale/teen/blonde-cd-gets-kidnapped-by-two-blacks-and-punished-for-being-a-slutty-girl/19569151/',
29 'only_matching': True,
33 def _extract_urls(webpage
):
35 r
'<iframe[^>]+\bsrc=["\']((?
:https?
:)?
//(?
:www\
.)?tube8\
.com
/embed
/(?
:[^
/]+/)+\d
+)',
38 def _real_extract(self, url):
39 webpage, info = self._extract_info(url)
42 info['title
'] = self._html_search_regex(
43 r'videoTitle\s
*=\s
*"([^"]+)', webpage, 'title
')
45 description = self._html_search_regex(
46 r'(?s
)Description
:</dt
>\s
*<dd
>(.+?
)</dd
>', webpage, 'description
', fatal=False)
47 uploader = self._html_search_regex(
48 r'<span
class="username">\s
*(.+?
)\s
*<',
49 webpage, 'uploader
', fatal=False)
51 like_count = int_or_none(self._search_regex(
52 r'rupVar\s
*=\s
*"(\d+)"', webpage, 'like count
', fatal=False))
53 dislike_count = int_or_none(self._search_regex(
54 r'rdownVar\s
*=\s
*"(\d+)"', webpage, 'dislike count
', fatal=False))
55 view_count = str_to_int(self._search_regex(
56 r'Views
:\s
*</dt
>\s
*<dd
>([\d
,\
.]+)',
57 webpage, 'view count
', fatal=False))
58 comment_count = str_to_int(self._search_regex(
59 r'<span
id="allCommentsCount">(\d
+)</span
>',
60 webpage, 'comment count
', fatal=False))
62 category = self._search_regex(
63 r'Category
:\s
*</dt
>\s
*<dd
>\s
*<a
[^
>]+href
=[^
>]+>([^
<]+)',
64 webpage, 'category
', fatal=False)
65 categories = [category] if category else None
67 tags_str = self._search_regex(
68 r'(?s
)Tags
:\s
*</dt
>\s
*<dd
>(.+?
)</(?
!a
)',
69 webpage, 'tags
', fatal=False)
70 tags = [t for t in re.findall(
71 r'<a
[^
>]+href
=[^
>]+>([^
<]+)', tags_str)] if tags_str else None
74 'description
': description,
76 'view_count
': view_count,
77 'like_count
': like_count,
78 'dislike_count
': dislike_count,
79 'comment_count
': comment_count,
80 'categories
': categories,