]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/tube8.py
4053f6c2150ff536cce19a7fede105f0fee5d8d8
1 from __future__
import unicode_literals
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',
26 'url': 'http://www.tube8.com/shemale/teen/blonde-cd-gets-kidnapped-by-two-blacks-and-punished-for-being-a-slutty-girl/19569151/',
27 'only_matching': True,
30 def _real_extract(self
, url
):
31 webpage
, info
= self
._extract
_info
(url
)
34 info
['title'] = self
._html
_search
_regex
(
35 r
'videoTitle\s*=\s*"([^"]+)', webpage
, 'title')
37 description
= self
._html
_search
_regex
(
38 r
'>Description:</strong>\s*(.+?)\s*<', webpage
, 'description', fatal
=False)
39 uploader
= self
._html
_search
_regex
(
40 r
'<span class="username">\s*(.+?)\s*<',
41 webpage
, 'uploader', fatal
=False)
43 like_count
= int_or_none(self
._search
_regex
(
44 r
'rupVar\s*=\s*"(\d+)"', webpage
, 'like count', fatal
=False))
45 dislike_count
= int_or_none(self
._search
_regex
(
46 r
'rdownVar\s*=\s*"(\d+)"', webpage
, 'dislike count', fatal
=False))
47 view_count
= str_to_int(self
._search
_regex
(
48 r
'<strong>Views: </strong>([\d,\.]+)\s*</li>',
49 webpage
, 'view count', fatal
=False))
50 comment_count
= str_to_int(self
._search
_regex
(
51 r
'<span id="allCommentsCount">(\d+)</span>',
52 webpage
, 'comment count', fatal
=False))
55 'description': description
,
57 'view_count': view_count
,
58 'like_count': like_count
,
59 'dislike_count': dislike_count
,
60 'comment_count': comment_count
,