]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/goshgay.py
1 # -*- coding: utf-8 -*-
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
13 class GoshgayIE(InfoExtractor
):
14 _VALID_URL
= r
'https?://www\.goshgay\.com/video(?P<id>\d+?)($|/)'
16 'url': 'http://www.goshgay.com/video299069/diesel_sfw_xxx_video',
17 'md5': '027fcc54459dff0feb0bc06a7aeda680',
21 'title': 'DIESEL SFW XXX Video',
22 'thumbnail': 're:^http://.*\.jpg$',
28 def _real_extract(self
, url
):
29 video_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, video_id
)
32 title
= self
._html
_search
_regex
(
33 r
'<h2>(.*?)<', webpage
, 'title')
34 duration
= parse_duration(self
._html
_search
_regex
(
35 r
'<span class="duration">\s*-?\s*(.*?)</span>',
36 webpage
, 'duration', fatal
=False))
37 family_friendly
= self
._html
_search
_meta
(
38 'isFamilyFriendly', webpage
, default
='false')
40 flashvars
= compat_parse_qs(self
._html
_search
_regex
(
41 r
'<embed.+?id="flash-player-embed".+?flashvars="([^"]+)"',
42 webpage
, 'flashvars'))
43 thumbnail
= flashvars
.get('url_bigthumb', [None])[0]
44 video_url
= flashvars
['flv_url'][0]
50 'thumbnail': thumbnail
,
52 'age_limit': 0 if family_friendly
== 'true' else 18,