]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/mofosex.py
1 from __future__
import unicode_literals
8 from .keezmovies
import KeezMoviesIE
11 class MofosexIE(KeezMoviesIE
):
12 _VALID_URL
= r
'https?://(?:www\.)?mofosex\.com/videos/(?P<id>\d+)/(?P<display_id>[^/?#&.]+)\.html'
14 'url': 'http://www.mofosex.com/videos/318131/amateur-teen-playing-and-masturbating-318131.html',
15 'md5': '39a15853632b7b2e5679f92f69b78e91',
18 'display_id': 'amateur-teen-playing-and-masturbating-318131',
20 'title': 'amateur teen playing and masturbating',
21 'thumbnail': r
're:^https?://.*\.jpg$',
22 'upload_date': '20121114',
29 # This video is no longer available
30 'url': 'http://www.mofosex.com/videos/5018/japanese-teen-music-video.html',
31 'only_matching': True,
34 def _real_extract(self
, url
):
35 webpage
, info
= self
._extract
_info
(url
)
37 view_count
= str_to_int(self
._search
_regex
(
38 r
'VIEWS:</span>\s*([\d,.]+)', webpage
, 'view count', fatal
=False))
39 like_count
= int_or_none(self
._search
_regex
(
40 r
'id=["\']amountLikes
["\'][^>]*>(\d+)', webpage,
41 'like count', fatal=False))
42 dislike_count = int_or_none(self._search_regex(
43 r'id=["\']amountDislikes
["\'][^>]*>(\d+)', webpage,
44 'like count', fatal=False))
45 upload_date = unified_strdate(self._html_search_regex(
46 r'Added:</span>([^<]+)', webpage, 'upload date', fatal=False))
49 'view_count': view_count,
50 'like_count': like_count,
51 'dislike_count': dislike_count,
52 'upload_date': upload_date,
53 'thumbnail': self._og_search_thumbnail(webpage),