]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cliphunter.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from ..utils
import int_or_none
8 'a': 'h', 'd': 'e', 'e': 'v', 'f': 'o', 'g': 'f', 'i': 'd', 'l': 'n',
9 'm': 'a', 'n': 'm', 'p': 'u', 'q': 't', 'r': 's', 'v': 'p', 'x': 'r',
11 '$': ':', '&': '.', '(': '=', '^': '&', '=': '/',
16 return ''.join(_translation_table
.get(c
, c
) for c
in s
)
19 class CliphunterIE(InfoExtractor
):
20 IE_NAME
= 'cliphunter'
22 _VALID_URL
= r
'''(?x)https?://(?:www\.)?cliphunter\.com/w/
24 (?P<seo>.+?)(?:$|[#\?])
27 'url': 'http://www.cliphunter.com/w/1012420/Fun_Jynx_Maze_solo',
28 'md5': 'b7c9bbd4eb3a226ab91093714dcaa480',
32 'title': 'Fun Jynx Maze solo',
33 'thumbnail': r
're:^https?://.*\.jpg$',
38 'url': 'http://www.cliphunter.com/w/2019449/ShesNew__My_booty_girlfriend_Victoria_Paradices_pussy_filled_with_jizz',
39 'md5': '55a723c67bfc6da6b0cfa00d55da8a27',
43 'title': 'ShesNew - My booty girlfriend, Victoria Paradice\'s pussy filled with jizz',
44 'thumbnail': r
're:^https?://.*\.jpg$',
49 def _real_extract(self
, url
):
50 video_id
= self
._match
_id
(url
)
51 webpage
= self
._download
_webpage
(url
, video_id
)
53 video_title
= self
._search
_regex
(
54 r
'mediaTitle = "([^"]+)"', webpage
, 'title')
56 gexo_files
= self
._parse
_json
(
58 r
'var\s+gexoFiles\s*=\s*({.+?});', webpage
, 'gexo files'),
62 for format_id
, f
in gexo_files
.items():
63 video_url
= f
.get('url')
68 format_id
= '%s_%sp' % (fmt
, height
) if fmt
and height
else format_id
70 'url': _decode(video_url
),
71 'format_id': format_id
,
72 'width': int_or_none(f
.get('w')),
73 'height': int_or_none(height
),
74 'tbr': int_or_none(f
.get('br')),
76 self
._sort
_formats
(formats
)
78 thumbnail
= self
._search
_regex
(
79 r
"var\s+mov_thumb\s*=\s*'([^']+)';",
80 webpage
, 'thumbnail', fatal
=False)
86 'age_limit': self
._rta
_search
(webpage
),
87 'thumbnail': thumbnail
,