3 from .mtv import MTVIE, _media_xml_tag
6 class SouthParkStudiosIE(MTVIE):
7 IE_NAME = u'southparkstudios.com'
8 _VALID_URL = r'(https?://)?(www\.)?(?P<url>southparkstudios\.com/(clips|full-episodes)/(?P<id>.+?)(\?|#|$))'
10 _FEED_URL = 'http://www.southparkstudios.com/feeds/video-player/mrss'
12 # Overwrite MTVIE properties we don't want
14 u'url': u'http://www.southparkstudios.com/clips/104437/bat-daded#tab=featured',
15 u'file': u'a7bff6c2-ed00-11e0-aca6-0026b9414f30.mp4',
17 u'title': u'Bat Daded',
18 u'description': u'Randy disqualifies South Park by getting into a fight with Bat Dad.',
22 def _get_thumbnail_url(self, uri, itemdoc):
23 search_path = '%s/%s' % (_media_xml_tag('group'), _media_xml_tag('thumbnail'))
24 thumb_node = itemdoc.find(search_path)
25 if thumb_node is None:
28 return thumb_node.attrib['url']
30 def _real_extract(self, url):
31 mobj = re.match(self._VALID_URL, url)
32 url = u'http://www.' + mobj.group(u'url')
33 video_id = mobj.group('id')
34 webpage = self._download_webpage(url, video_id)
35 mgid = self._search_regex(r'swfobject.embedSWF\(".*?(mgid:.*?)"',
37 return self._get_videos_info(mgid)
39 class SouthparkDeIE(SouthParkStudiosIE):
40 IE_NAME = u'southpark.de'
41 _VALID_URL = r'(https?://)?(www\.)?(?P<url>southpark\.de/(clips|alle-episoden)/(?P<id>.+?)(\?|#|$))'
42 _FEED_URL = 'http://www.southpark.de/feeds/video-player/mrss/'
45 u'url': u'http://www.southpark.de/clips/uygssh/the-government-wont-respect-my-privacy#tab=featured',
46 u'file': u'85487c96-b3b9-4e39-9127-ad88583d9bf2.mp4',
48 u'title': u'The Government Won\'t Respect My Privacy',
49 u'description': u'Cartman explains the benefits of "Shitter" to Stan, Kyle and Craig.',