3 from .common
import InfoExtractor
9 class GoshgayIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?goshgay\.com/video(?P<id>\d+?)($|/)'
12 'url': 'http://www.goshgay.com/video299069/diesel_sfw_xxx_video',
13 'md5': '4b6db9a0a333142eb9f15913142b0ed1',
17 'title': 'DIESEL SFW XXX Video',
18 'thumbnail': r
're:^http://.*\.jpg$',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, video_id
)
28 title
= self
._html
_search
_regex
(
29 r
'<h2>(.*?)<', webpage
, 'title')
30 duration
= parse_duration(self
._html
_search
_regex
(
31 r
'<span class="duration">\s*-?\s*(.*?)</span>',
32 webpage
, 'duration', fatal
=False))
34 flashvars
= urllib
.parse
.parse_qs(self
._html
_search
_regex
(
35 r
'<embed.+?id="flash-player-embed".+?flashvars="([^"]+)"',
36 webpage
, 'flashvars'))
37 thumbnail
= flashvars
.get('url_bigthumb', [None])[0]
38 video_url
= flashvars
['flv_url'][0]
44 'thumbnail': thumbnail
,