1 from .common
import InfoExtractor
2 from ..compat
import compat_urllib_parse_unquote
5 class XBefIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?xbef\.com/video/(?P<id>[0-9]+)'
8 'url': 'http://xbef.com/video/5119-glamourous-lesbians-smoking-drinking-and-fucking',
9 'md5': 'a478b565baff61634a98f5e5338be995',
13 'title': 'md5:7358a9faef8b7b57acda7c04816f170e',
15 'thumbnail': r
're:^http://.*\.jpg',
19 def _real_extract(self
, url
):
20 video_id
= self
._match
_id
(url
)
21 webpage
= self
._download
_webpage
(url
, video_id
)
23 title
= self
._html
_search
_regex
(
24 r
'<h1[^>]*>(.*?)</h1>', webpage
, 'title')
26 config_url_enc
= self
._download
_webpage
(
27 'http://xbef.com/Main/GetVideoURLEncoded/%s' % video_id
, video_id
,
28 note
='Retrieving config URL')
29 config_url
= compat_urllib_parse_unquote(config_url_enc
)
30 config
= self
._download
_xml
(
31 config_url
, video_id
, note
='Retrieving config')
33 video_url
= config
.find('./file').text
34 thumbnail
= config
.find('./image').text
40 'thumbnail': thumbnail
,