1 from .common
import InfoExtractor
8 class MoeVideoIE(InfoExtractor
):
9 IE_DESC
= 'LetitBit video services: moevideo.net, playreplay.net and videochart.net'
11 https?://(?P<host>(?:www\.)?
12 (?:(?:moevideo|playreplay|videochart)\.net|thesame\.tv))/
13 (?:video|framevideo|embed)/(?P<id>[0-9a-z]+\.[0-9A-Za-z]+)'''
14 _API_URL
= 'http://api.letitbit.net/'
15 _API_KEY
= 'tVL0gjqo5'
18 'url': 'http://moevideo.net/video/00297.0036103fe3d513ef27915216fd29',
19 'md5': '129f5ae1f6585d0e9bb4f38e774ffb3a',
21 'id': '00297.0036103fe3d513ef27915216fd29',
23 'title': 'Sink cut out machine',
24 'description': 'md5:f29ff97b663aefa760bf7ca63c8ca8a8',
25 'thumbnail': r
're:^https?://.*\.jpg$',
31 'skip': 'Video has been removed',
34 'url': 'http://playreplay.net/video/77107.7f325710a627383d40540d8e991a',
35 'md5': '74f0a014d5b661f0f0e2361300d1620e',
37 'id': '77107.7f325710a627383d40540d8e991a',
39 'title': 'Operacion Condor.',
40 'description': 'md5:7e68cb2fcda66833d5081c542491a9a3',
41 'thumbnail': r
're:^https?://.*\.jpg$',
45 'filesize': 588257923,
47 'skip': 'Video has been removed',
51 def _real_extract(self
, url
):
52 host
, video_id
= self
._match
_valid
_url
(url
).groups()
54 webpage
= self
._download
_webpage
(
55 'http://%s/video/%s' % (host
, video_id
),
56 video_id
, 'Downloading webpage')
58 title
= self
._og
_search
_title
(webpage
)
60 embed_webpage
= self
._download
_webpage
(
61 'http://%s/embed/%s' % (host
, video_id
),
62 video_id
, 'Downloading embed webpage')
63 video
= self
._parse
_json
(self
._search
_regex
(
64 r
'mvplayer\("#player"\s*,\s*({.+})',
65 embed_webpage
, 'mvplayer'), video_id
)['video']
70 'thumbnail': video
.get('poster') or self
._og
_search
_thumbnail
(webpage
),
71 'description': clean_html(self
._og
_search
_description
(webpage
)),
72 'duration': int_or_none(self
._og
_search
_property
('video:duration', webpage
)),
73 'url': video
['ourUrl'],