]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/southparkstudios.py
3 from .mtv
import MTVIE
, _media_xml_tag
6 class SouthParkStudiosIE(MTVIE
):
7 IE_NAME
= u
'southparkstudios.com'
8 _VALID_URL
= r
'https?://www\.southparkstudios\.com/(clips|full-episodes)/(?P<id>.+?)(\?|#|$)'
10 _FEED_URL
= 'http://www.southparkstudios.com/feeds/video-player/mrss'
13 u
'url': u
'http://www.southparkstudios.com/clips/104437/bat-daded#tab=featured',
14 u
'file': u
'a7bff6c2-ed00-11e0-aca6-0026b9414f30.mp4',
16 u
'title': u
'Bat Daded',
17 u
'description': u
'Randy disqualifies South Park by getting into a fight with Bat Dad.',
21 # Overwrite MTVIE properties we don't want
24 def _get_thumbnail_url(self
, uri
, itemdoc
):
25 search_path
= '%s/%s' % (_media_xml_tag('group'), _media_xml_tag('thumbnail'))
26 thumb_node
= itemdoc
.find(search_path
)
27 if thumb_node
is None:
30 return thumb_node
.attrib
['url']
32 def _real_extract(self
, url
):
33 mobj
= re
.match(self
._VALID
_URL
, url
)
34 video_id
= mobj
.group('id')
35 webpage
= self
._download
_webpage
(url
, video_id
)
36 mgid
= self
._search
_regex
(r
'swfobject.embedSWF\(".*?(mgid:.*?)"',
38 return self
._get
_videos
_info
(mgid
)