InfoExtractors.py 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  1. import base64
  2. import datetime
  3. import itertools
  4. import netrc
  5. import os
  6. import re
  7. import socket
  8. import time
  9. import email.utils
  10. import xml.etree.ElementTree
  11. import random
  12. import math
  13. import operator
  14. import hashlib
  15. import binascii
  16. import urllib
  17. from .utils import *
  18. from .extractor.common import InfoExtractor, SearchInfoExtractor
  19. from .extractor.ard import ARDIE
  20. from .extractor.arte import ArteTvIE
  21. from .extractor.bliptv import BlipTVIE, BlipTVUserIE
  22. from .extractor.comedycentral import ComedyCentralIE
  23. from .extractor.collegehumor import CollegeHumorIE
  24. from .extractor.dailymotion import DailymotionIE
  25. from .extractor.depositfiles import DepositFilesIE
  26. from .extractor.escapist import EscapistIE
  27. from .extractor.facebook import FacebookIE
  28. from .extractor.gametrailers import GametrailersIE
  29. from .extractor.generic import GenericIE
  30. from .extractor.googleplus import GooglePlusIE
  31. from .extractor.googlesearch import GoogleSearchIE
  32. from .extractor.infoq import InfoQIE
  33. from .extractor.metacafe import MetacafeIE
  34. from .extractor.mixcloud import MixcloudIE
  35. from .extractor.mtv import MTVIE
  36. from .extractor.myvideo import MyVideoIE
  37. from .extractor.nba import NBAIE
  38. from .extractor.statigram import StatigramIE
  39. from .extractor.photobucket import PhotobucketIE
  40. from .extractor.soundcloud import SoundcloudIE, SoundcloudSetIE
  41. from .extractor.stanfordoc import StanfordOpenClassroomIE
  42. from .extractor.steam import SteamIE
  43. from .extractor.ted import TEDIE
  44. from .extractor.vimeo import VimeoIE
  45. from .extractor.worldstarhiphop import WorldStarHipHopIE
  46. from .extractor.xnxx import XNXXIE
  47. from .extractor.xvideos import XVideosIE
  48. from .extractor.yahoo import YahooIE, YahooSearchIE
  49. from .extractor.youku import YoukuIE
  50. from .extractor.youtube import YoutubeIE, YoutubePlaylistIE, YoutubeSearchIE, YoutubeUserIE, YoutubeChannelIE
  51. from .extractor.zdf import ZDFIE
  52. class JustinTVIE(InfoExtractor):
  53. """Information extractor for justin.tv and twitch.tv"""
  54. # TODO: One broadcast may be split into multiple videos. The key
  55. # 'broadcast_id' is the same for all parts, and 'broadcast_part'
  56. # starts at 1 and increases. Can we treat all parts as one video?
  57. _VALID_URL = r"""(?x)^(?:http://)?(?:www\.)?(?:twitch|justin)\.tv/
  58. (?:
  59. (?P<channelid>[^/]+)|
  60. (?:(?:[^/]+)/b/(?P<videoid>[^/]+))|
  61. (?:(?:[^/]+)/c/(?P<chapterid>[^/]+))
  62. )
  63. /?(?:\#.*)?$
  64. """
  65. _JUSTIN_PAGE_LIMIT = 100
  66. IE_NAME = u'justin.tv'
  67. def report_download_page(self, channel, offset):
  68. """Report attempt to download a single page of videos."""
  69. self.to_screen(u'%s: Downloading video information from %d to %d' %
  70. (channel, offset, offset + self._JUSTIN_PAGE_LIMIT))
  71. # Return count of items, list of *valid* items
  72. def _parse_page(self, url, video_id):
  73. webpage = self._download_webpage(url, video_id,
  74. u'Downloading video info JSON',
  75. u'unable to download video info JSON')
  76. response = json.loads(webpage)
  77. if type(response) != list:
  78. error_text = response.get('error', 'unknown error')
  79. raise ExtractorError(u'Justin.tv API: %s' % error_text)
  80. info = []
  81. for clip in response:
  82. video_url = clip['video_file_url']
  83. if video_url:
  84. video_extension = os.path.splitext(video_url)[1][1:]
  85. video_date = re.sub('-', '', clip['start_time'][:10])
  86. video_uploader_id = clip.get('user_id', clip.get('channel_id'))
  87. video_id = clip['id']
  88. video_title = clip.get('title', video_id)
  89. info.append({
  90. 'id': video_id,
  91. 'url': video_url,
  92. 'title': video_title,
  93. 'uploader': clip.get('channel_name', video_uploader_id),
  94. 'uploader_id': video_uploader_id,
  95. 'upload_date': video_date,
  96. 'ext': video_extension,
  97. })
  98. return (len(response), info)
  99. def _real_extract(self, url):
  100. mobj = re.match(self._VALID_URL, url)
  101. if mobj is None:
  102. raise ExtractorError(u'invalid URL: %s' % url)
  103. api_base = 'http://api.justin.tv'
  104. paged = False
  105. if mobj.group('channelid'):
  106. paged = True
  107. video_id = mobj.group('channelid')
  108. api = api_base + '/channel/archives/%s.json' % video_id
  109. elif mobj.group('chapterid'):
  110. chapter_id = mobj.group('chapterid')
  111. webpage = self._download_webpage(url, chapter_id)
  112. m = re.search(r'PP\.archive_id = "([0-9]+)";', webpage)
  113. if not m:
  114. raise ExtractorError(u'Cannot find archive of a chapter')
  115. archive_id = m.group(1)
  116. api = api_base + '/broadcast/by_chapter/%s.xml' % chapter_id
  117. chapter_info_xml = self._download_webpage(api, chapter_id,
  118. note=u'Downloading chapter information',
  119. errnote=u'Chapter information download failed')
  120. doc = xml.etree.ElementTree.fromstring(chapter_info_xml)
  121. for a in doc.findall('.//archive'):
  122. if archive_id == a.find('./id').text:
  123. break
  124. else:
  125. raise ExtractorError(u'Could not find chapter in chapter information')
  126. video_url = a.find('./video_file_url').text
  127. video_ext = video_url.rpartition('.')[2] or u'flv'
  128. chapter_api_url = u'https://api.twitch.tv/kraken/videos/c' + chapter_id
  129. chapter_info_json = self._download_webpage(chapter_api_url, u'c' + chapter_id,
  130. note='Downloading chapter metadata',
  131. errnote='Download of chapter metadata failed')
  132. chapter_info = json.loads(chapter_info_json)
  133. bracket_start = int(doc.find('.//bracket_start').text)
  134. bracket_end = int(doc.find('.//bracket_end').text)
  135. # TODO determine start (and probably fix up file)
  136. # youtube-dl -v http://www.twitch.tv/firmbelief/c/1757457
  137. #video_url += u'?start=' + TODO:start_timestamp
  138. # bracket_start is 13290, but we want 51670615
  139. self._downloader.report_warning(u'Chapter detected, but we can just download the whole file. '
  140. u'Chapter starts at %s and ends at %s' % (formatSeconds(bracket_start), formatSeconds(bracket_end)))
  141. info = {
  142. 'id': u'c' + chapter_id,
  143. 'url': video_url,
  144. 'ext': video_ext,
  145. 'title': chapter_info['title'],
  146. 'thumbnail': chapter_info['preview'],
  147. 'description': chapter_info['description'],
  148. 'uploader': chapter_info['channel']['display_name'],
  149. 'uploader_id': chapter_info['channel']['name'],
  150. }
  151. return [info]
  152. else:
  153. video_id = mobj.group('videoid')
  154. api = api_base + '/broadcast/by_archive/%s.json' % video_id
  155. self.report_extraction(video_id)
  156. info = []
  157. offset = 0
  158. limit = self._JUSTIN_PAGE_LIMIT
  159. while True:
  160. if paged:
  161. self.report_download_page(video_id, offset)
  162. page_url = api + ('?offset=%d&limit=%d' % (offset, limit))
  163. page_count, page_info = self._parse_page(page_url, video_id)
  164. info.extend(page_info)
  165. if not paged or page_count != limit:
  166. break
  167. offset += limit
  168. return info
  169. class FunnyOrDieIE(InfoExtractor):
  170. _VALID_URL = r'^(?:https?://)?(?:www\.)?funnyordie\.com/videos/(?P<id>[0-9a-f]+)/.*$'
  171. def _real_extract(self, url):
  172. mobj = re.match(self._VALID_URL, url)
  173. if mobj is None:
  174. raise ExtractorError(u'invalid URL: %s' % url)
  175. video_id = mobj.group('id')
  176. webpage = self._download_webpage(url, video_id)
  177. video_url = self._html_search_regex(r'<video[^>]*>\s*<source[^>]*>\s*<source src="(?P<url>[^"]+)"',
  178. webpage, u'video URL', flags=re.DOTALL)
  179. title = self._html_search_regex((r"<h1 class='player_page_h1'.*?>(?P<title>.*?)</h1>",
  180. r'<title>(?P<title>[^<]+?)</title>'), webpage, 'title', flags=re.DOTALL)
  181. video_description = self._html_search_regex(r'<meta property="og:description" content="(?P<desc>.*?)"',
  182. webpage, u'description', fatal=False, flags=re.DOTALL)
  183. info = {
  184. 'id': video_id,
  185. 'url': video_url,
  186. 'ext': 'mp4',
  187. 'title': title,
  188. 'description': video_description,
  189. }
  190. return [info]
  191. class UstreamIE(InfoExtractor):
  192. _VALID_URL = r'https?://www\.ustream\.tv/recorded/(?P<videoID>\d+)'
  193. IE_NAME = u'ustream'
  194. def _real_extract(self, url):
  195. m = re.match(self._VALID_URL, url)
  196. video_id = m.group('videoID')
  197. video_url = u'http://tcdn.ustream.tv/video/%s' % video_id
  198. webpage = self._download_webpage(url, video_id)
  199. self.report_extraction(video_id)
  200. video_title = self._html_search_regex(r'data-title="(?P<title>.+)"',
  201. webpage, u'title')
  202. uploader = self._html_search_regex(r'data-content-type="channel".*?>(?P<uploader>.*?)</a>',
  203. webpage, u'uploader', fatal=False, flags=re.DOTALL)
  204. thumbnail = self._html_search_regex(r'<link rel="image_src" href="(?P<thumb>.*?)"',
  205. webpage, u'thumbnail', fatal=False)
  206. info = {
  207. 'id': video_id,
  208. 'url': video_url,
  209. 'ext': 'flv',
  210. 'title': video_title,
  211. 'uploader': uploader,
  212. 'thumbnail': thumbnail,
  213. }
  214. return info
  215. class RBMARadioIE(InfoExtractor):
  216. _VALID_URL = r'https?://(?:www\.)?rbmaradio\.com/shows/(?P<videoID>[^/]+)$'
  217. def _real_extract(self, url):
  218. m = re.match(self._VALID_URL, url)
  219. video_id = m.group('videoID')
  220. webpage = self._download_webpage(url, video_id)
  221. json_data = self._search_regex(r'window\.gon.*?gon\.show=(.+?);$',
  222. webpage, u'json data', flags=re.MULTILINE)
  223. try:
  224. data = json.loads(json_data)
  225. except ValueError as e:
  226. raise ExtractorError(u'Invalid JSON: ' + str(e))
  227. video_url = data['akamai_url'] + '&cbr=256'
  228. url_parts = compat_urllib_parse_urlparse(video_url)
  229. video_ext = url_parts.path.rpartition('.')[2]
  230. info = {
  231. 'id': video_id,
  232. 'url': video_url,
  233. 'ext': video_ext,
  234. 'title': data['title'],
  235. 'description': data.get('teaser_text'),
  236. 'location': data.get('country_of_origin'),
  237. 'uploader': data.get('host', {}).get('name'),
  238. 'uploader_id': data.get('host', {}).get('slug'),
  239. 'thumbnail': data.get('image', {}).get('large_url_2x'),
  240. 'duration': data.get('duration'),
  241. }
  242. return [info]
  243. class YouPornIE(InfoExtractor):
  244. """Information extractor for youporn.com."""
  245. _VALID_URL = r'^(?:https?://)?(?:\w+\.)?youporn\.com/watch/(?P<videoid>[0-9]+)/(?P<title>[^/]+)'
  246. def _print_formats(self, formats):
  247. """Print all available formats"""
  248. print(u'Available formats:')
  249. print(u'ext\t\tformat')
  250. print(u'---------------------------------')
  251. for format in formats:
  252. print(u'%s\t\t%s' % (format['ext'], format['format']))
  253. def _specific(self, req_format, formats):
  254. for x in formats:
  255. if(x["format"]==req_format):
  256. return x
  257. return None
  258. def _real_extract(self, url):
  259. mobj = re.match(self._VALID_URL, url)
  260. if mobj is None:
  261. raise ExtractorError(u'Invalid URL: %s' % url)
  262. video_id = mobj.group('videoid')
  263. req = compat_urllib_request.Request(url)
  264. req.add_header('Cookie', 'age_verified=1')
  265. webpage = self._download_webpage(req, video_id)
  266. # Get JSON parameters
  267. json_params = self._search_regex(r'var currentVideo = new Video\((.*)\);', webpage, u'JSON parameters')
  268. try:
  269. params = json.loads(json_params)
  270. except:
  271. raise ExtractorError(u'Invalid JSON')
  272. self.report_extraction(video_id)
  273. try:
  274. video_title = params['title']
  275. upload_date = unified_strdate(params['release_date_f'])
  276. video_description = params['description']
  277. video_uploader = params['submitted_by']
  278. thumbnail = params['thumbnails'][0]['image']
  279. except KeyError:
  280. raise ExtractorError('Missing JSON parameter: ' + sys.exc_info()[1])
  281. # Get all of the formats available
  282. DOWNLOAD_LIST_RE = r'(?s)<ul class="downloadList">(?P<download_list>.*?)</ul>'
  283. download_list_html = self._search_regex(DOWNLOAD_LIST_RE,
  284. webpage, u'download list').strip()
  285. # Get all of the links from the page
  286. LINK_RE = r'(?s)<a href="(?P<url>[^"]+)">'
  287. links = re.findall(LINK_RE, download_list_html)
  288. if(len(links) == 0):
  289. raise ExtractorError(u'ERROR: no known formats available for video')
  290. self.to_screen(u'Links found: %d' % len(links))
  291. formats = []
  292. for link in links:
  293. # A link looks like this:
  294. # http://cdn1.download.youporn.phncdn.com/201210/31/8004515/480p_370k_8004515/YouPorn%20-%20Nubile%20Films%20The%20Pillow%20Fight.mp4?nvb=20121113051249&nva=20121114051249&ir=1200&sr=1200&hash=014b882080310e95fb6a0
  295. # A path looks like this:
  296. # /201210/31/8004515/480p_370k_8004515/YouPorn%20-%20Nubile%20Films%20The%20Pillow%20Fight.mp4
  297. video_url = unescapeHTML( link )
  298. path = compat_urllib_parse_urlparse( video_url ).path
  299. extension = os.path.splitext( path )[1][1:]
  300. format = path.split('/')[4].split('_')[:2]
  301. size = format[0]
  302. bitrate = format[1]
  303. format = "-".join( format )
  304. # title = u'%s-%s-%s' % (video_title, size, bitrate)
  305. formats.append({
  306. 'id': video_id,
  307. 'url': video_url,
  308. 'uploader': video_uploader,
  309. 'upload_date': upload_date,
  310. 'title': video_title,
  311. 'ext': extension,
  312. 'format': format,
  313. 'thumbnail': thumbnail,
  314. 'description': video_description
  315. })
  316. if self._downloader.params.get('listformats', None):
  317. self._print_formats(formats)
  318. return
  319. req_format = self._downloader.params.get('format', None)
  320. self.to_screen(u'Format: %s' % req_format)
  321. if req_format is None or req_format == 'best':
  322. return [formats[0]]
  323. elif req_format == 'worst':
  324. return [formats[-1]]
  325. elif req_format in ('-1', 'all'):
  326. return formats
  327. else:
  328. format = self._specific( req_format, formats )
  329. if result is None:
  330. raise ExtractorError(u'Requested format not available')
  331. return [format]
  332. class PornotubeIE(InfoExtractor):
  333. """Information extractor for pornotube.com."""
  334. _VALID_URL = r'^(?:https?://)?(?:\w+\.)?pornotube\.com(/c/(?P<channel>[0-9]+))?(/m/(?P<videoid>[0-9]+))(/(?P<title>.+))$'
  335. def _real_extract(self, url):
  336. mobj = re.match(self._VALID_URL, url)
  337. if mobj is None:
  338. raise ExtractorError(u'Invalid URL: %s' % url)
  339. video_id = mobj.group('videoid')
  340. video_title = mobj.group('title')
  341. # Get webpage content
  342. webpage = self._download_webpage(url, video_id)
  343. # Get the video URL
  344. VIDEO_URL_RE = r'url: "(?P<url>http://video[0-9].pornotube.com/.+\.flv)",'
  345. video_url = self._search_regex(VIDEO_URL_RE, webpage, u'video url')
  346. video_url = compat_urllib_parse.unquote(video_url)
  347. #Get the uploaded date
  348. VIDEO_UPLOADED_RE = r'<div class="video_added_by">Added (?P<date>[0-9\/]+) by'
  349. upload_date = self._html_search_regex(VIDEO_UPLOADED_RE, webpage, u'upload date', fatal=False)
  350. if upload_date: upload_date = unified_strdate(upload_date)
  351. info = {'id': video_id,
  352. 'url': video_url,
  353. 'uploader': None,
  354. 'upload_date': upload_date,
  355. 'title': video_title,
  356. 'ext': 'flv',
  357. 'format': 'flv'}
  358. return [info]
  359. class YouJizzIE(InfoExtractor):
  360. """Information extractor for youjizz.com."""
  361. _VALID_URL = r'^(?:https?://)?(?:\w+\.)?youjizz\.com/videos/(?P<videoid>[^.]+).html$'
  362. def _real_extract(self, url):
  363. mobj = re.match(self._VALID_URL, url)
  364. if mobj is None:
  365. raise ExtractorError(u'Invalid URL: %s' % url)
  366. video_id = mobj.group('videoid')
  367. # Get webpage content
  368. webpage = self._download_webpage(url, video_id)
  369. # Get the video title
  370. video_title = self._html_search_regex(r'<title>(?P<title>.*)</title>',
  371. webpage, u'title').strip()
  372. # Get the embed page
  373. result = re.search(r'https?://www.youjizz.com/videos/embed/(?P<videoid>[0-9]+)', webpage)
  374. if result is None:
  375. raise ExtractorError(u'ERROR: unable to extract embed page')
  376. embed_page_url = result.group(0).strip()
  377. video_id = result.group('videoid')
  378. webpage = self._download_webpage(embed_page_url, video_id)
  379. # Get the video URL
  380. video_url = self._search_regex(r'so.addVariable\("file",encodeURIComponent\("(?P<source>[^"]+)"\)\);',
  381. webpage, u'video URL')
  382. info = {'id': video_id,
  383. 'url': video_url,
  384. 'title': video_title,
  385. 'ext': 'flv',
  386. 'format': 'flv',
  387. 'player_url': embed_page_url}
  388. return [info]
  389. class EightTracksIE(InfoExtractor):
  390. IE_NAME = '8tracks'
  391. _VALID_URL = r'https?://8tracks.com/(?P<user>[^/]+)/(?P<id>[^/#]+)(?:#.*)?$'
  392. def _real_extract(self, url):
  393. mobj = re.match(self._VALID_URL, url)
  394. if mobj is None:
  395. raise ExtractorError(u'Invalid URL: %s' % url)
  396. playlist_id = mobj.group('id')
  397. webpage = self._download_webpage(url, playlist_id)
  398. json_like = self._search_regex(r"PAGE.mix = (.*?);\n", webpage, u'trax information', flags=re.DOTALL)
  399. data = json.loads(json_like)
  400. session = str(random.randint(0, 1000000000))
  401. mix_id = data['id']
  402. track_count = data['tracks_count']
  403. first_url = 'http://8tracks.com/sets/%s/play?player=sm&mix_id=%s&format=jsonh' % (session, mix_id)
  404. next_url = first_url
  405. res = []
  406. for i in itertools.count():
  407. api_json = self._download_webpage(next_url, playlist_id,
  408. note=u'Downloading song information %s/%s' % (str(i+1), track_count),
  409. errnote=u'Failed to download song information')
  410. api_data = json.loads(api_json)
  411. track_data = api_data[u'set']['track']
  412. info = {
  413. 'id': track_data['id'],
  414. 'url': track_data['track_file_stream_url'],
  415. 'title': track_data['performer'] + u' - ' + track_data['name'],
  416. 'raw_title': track_data['name'],
  417. 'uploader_id': data['user']['login'],
  418. 'ext': 'm4a',
  419. }
  420. res.append(info)
  421. if api_data['set']['at_last_track']:
  422. break
  423. next_url = 'http://8tracks.com/sets/%s/next?player=sm&mix_id=%s&format=jsonh&track_id=%s' % (session, mix_id, track_data['id'])
  424. return res
  425. class KeekIE(InfoExtractor):
  426. _VALID_URL = r'http://(?:www\.)?keek\.com/(?:!|\w+/keeks/)(?P<videoID>\w+)'
  427. IE_NAME = u'keek'
  428. def _real_extract(self, url):
  429. m = re.match(self._VALID_URL, url)
  430. video_id = m.group('videoID')
  431. video_url = u'http://cdn.keek.com/keek/video/%s' % video_id
  432. thumbnail = u'http://cdn.keek.com/keek/thumbnail/%s/w100/h75' % video_id
  433. webpage = self._download_webpage(url, video_id)
  434. video_title = self._html_search_regex(r'<meta property="og:title" content="(?P<title>.*?)"',
  435. webpage, u'title')
  436. uploader = self._html_search_regex(r'<div class="user-name-and-bio">[\S\s]+?<h2>(?P<uploader>.+?)</h2>',
  437. webpage, u'uploader', fatal=False)
  438. info = {
  439. 'id': video_id,
  440. 'url': video_url,
  441. 'ext': 'mp4',
  442. 'title': video_title,
  443. 'thumbnail': thumbnail,
  444. 'uploader': uploader
  445. }
  446. return [info]
  447. class MySpassIE(InfoExtractor):
  448. _VALID_URL = r'http://www.myspass.de/.*'
  449. def _real_extract(self, url):
  450. META_DATA_URL_TEMPLATE = 'http://www.myspass.de/myspass/includes/apps/video/getvideometadataxml.php?id=%s'
  451. # video id is the last path element of the URL
  452. # usually there is a trailing slash, so also try the second but last
  453. url_path = compat_urllib_parse_urlparse(url).path
  454. url_parent_path, video_id = os.path.split(url_path)
  455. if not video_id:
  456. _, video_id = os.path.split(url_parent_path)
  457. # get metadata
  458. metadata_url = META_DATA_URL_TEMPLATE % video_id
  459. metadata_text = self._download_webpage(metadata_url, video_id)
  460. metadata = xml.etree.ElementTree.fromstring(metadata_text.encode('utf-8'))
  461. # extract values from metadata
  462. url_flv_el = metadata.find('url_flv')
  463. if url_flv_el is None:
  464. raise ExtractorError(u'Unable to extract download url')
  465. video_url = url_flv_el.text
  466. extension = os.path.splitext(video_url)[1][1:]
  467. title_el = metadata.find('title')
  468. if title_el is None:
  469. raise ExtractorError(u'Unable to extract title')
  470. title = title_el.text
  471. format_id_el = metadata.find('format_id')
  472. if format_id_el is None:
  473. format = ext
  474. else:
  475. format = format_id_el.text
  476. description_el = metadata.find('description')
  477. if description_el is not None:
  478. description = description_el.text
  479. else:
  480. description = None
  481. imagePreview_el = metadata.find('imagePreview')
  482. if imagePreview_el is not None:
  483. thumbnail = imagePreview_el.text
  484. else:
  485. thumbnail = None
  486. info = {
  487. 'id': video_id,
  488. 'url': video_url,
  489. 'title': title,
  490. 'ext': extension,
  491. 'format': format,
  492. 'thumbnail': thumbnail,
  493. 'description': description
  494. }
  495. return [info]
  496. class SpiegelIE(InfoExtractor):
  497. _VALID_URL = r'https?://(?:www\.)?spiegel\.de/video/[^/]*-(?P<videoID>[0-9]+)(?:\.html)?(?:#.*)?$'
  498. def _real_extract(self, url):
  499. m = re.match(self._VALID_URL, url)
  500. video_id = m.group('videoID')
  501. webpage = self._download_webpage(url, video_id)
  502. video_title = self._html_search_regex(r'<div class="module-title">(.*?)</div>',
  503. webpage, u'title')
  504. xml_url = u'http://video2.spiegel.de/flash/' + video_id + u'.xml'
  505. xml_code = self._download_webpage(xml_url, video_id,
  506. note=u'Downloading XML', errnote=u'Failed to download XML')
  507. idoc = xml.etree.ElementTree.fromstring(xml_code)
  508. last_type = idoc[-1]
  509. filename = last_type.findall('./filename')[0].text
  510. duration = float(last_type.findall('./duration')[0].text)
  511. video_url = 'http://video2.spiegel.de/flash/' + filename
  512. video_ext = filename.rpartition('.')[2]
  513. info = {
  514. 'id': video_id,
  515. 'url': video_url,
  516. 'ext': video_ext,
  517. 'title': video_title,
  518. 'duration': duration,
  519. }
  520. return [info]
  521. class LiveLeakIE(InfoExtractor):
  522. _VALID_URL = r'^(?:http?://)?(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<video_id>[\w_]+)(?:.*)'
  523. IE_NAME = u'liveleak'
  524. def _real_extract(self, url):
  525. mobj = re.match(self._VALID_URL, url)
  526. if mobj is None:
  527. raise ExtractorError(u'Invalid URL: %s' % url)
  528. video_id = mobj.group('video_id')
  529. webpage = self._download_webpage(url, video_id)
  530. video_url = self._search_regex(r'file: "(.*?)",',
  531. webpage, u'video URL')
  532. video_title = self._html_search_regex(r'<meta property="og:title" content="(?P<title>.*?)"',
  533. webpage, u'title').replace('LiveLeak.com -', '').strip()
  534. video_description = self._html_search_regex(r'<meta property="og:description" content="(?P<desc>.*?)"',
  535. webpage, u'description', fatal=False)
  536. video_uploader = self._html_search_regex(r'By:.*?(\w+)</a>',
  537. webpage, u'uploader', fatal=False)
  538. info = {
  539. 'id': video_id,
  540. 'url': video_url,
  541. 'ext': 'mp4',
  542. 'title': video_title,
  543. 'description': video_description,
  544. 'uploader': video_uploader
  545. }
  546. return [info]
  547. class TumblrIE(InfoExtractor):
  548. _VALID_URL = r'http://(?P<blog_name>.*?)\.tumblr\.com/((post)|(video))/(?P<id>\d*)/(.*?)'
  549. def _real_extract(self, url):
  550. m_url = re.match(self._VALID_URL, url)
  551. video_id = m_url.group('id')
  552. blog = m_url.group('blog_name')
  553. url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id)
  554. webpage = self._download_webpage(url, video_id)
  555. re_video = r'src=\\x22(?P<video_url>http://%s\.tumblr\.com/video_file/%s/(.*?))\\x22 type=\\x22video/(?P<ext>.*?)\\x22' % (blog, video_id)
  556. video = re.search(re_video, webpage)
  557. if video is None:
  558. raise ExtractorError(u'Unable to extract video')
  559. video_url = video.group('video_url')
  560. ext = video.group('ext')
  561. video_thumbnail = self._search_regex(r'posters(.*?)\[\\x22(?P<thumb>.*?)\\x22',
  562. webpage, u'thumbnail', fatal=False) # We pick the first poster
  563. if video_thumbnail: video_thumbnail = video_thumbnail.replace('\\', '')
  564. # The only place where you can get a title, it's not complete,
  565. # but searching in other places doesn't work for all videos
  566. video_title = self._html_search_regex(r'<title>(?P<title>.*?)</title>',
  567. webpage, u'title', flags=re.DOTALL)
  568. return [{'id': video_id,
  569. 'url': video_url,
  570. 'title': video_title,
  571. 'thumbnail': video_thumbnail,
  572. 'ext': ext
  573. }]
  574. class BandcampIE(InfoExtractor):
  575. _VALID_URL = r'http://.*?\.bandcamp\.com/track/(?P<title>.*)'
  576. def _real_extract(self, url):
  577. mobj = re.match(self._VALID_URL, url)
  578. title = mobj.group('title')
  579. webpage = self._download_webpage(url, title)
  580. # We get the link to the free download page
  581. m_download = re.search(r'freeDownloadPage: "(.*?)"', webpage)
  582. if m_download is None:
  583. raise ExtractorError(u'No free songs found')
  584. download_link = m_download.group(1)
  585. id = re.search(r'var TralbumData = {(.*?)id: (?P<id>\d*?)$',
  586. webpage, re.MULTILINE|re.DOTALL).group('id')
  587. download_webpage = self._download_webpage(download_link, id,
  588. 'Downloading free downloads page')
  589. # We get the dictionary of the track from some javascrip code
  590. info = re.search(r'items: (.*?),$',
  591. download_webpage, re.MULTILINE).group(1)
  592. info = json.loads(info)[0]
  593. # We pick mp3-320 for now, until format selection can be easily implemented.
  594. mp3_info = info[u'downloads'][u'mp3-320']
  595. # If we try to use this url it says the link has expired
  596. initial_url = mp3_info[u'url']
  597. re_url = r'(?P<server>http://(.*?)\.bandcamp\.com)/download/track\?enc=mp3-320&fsig=(?P<fsig>.*?)&id=(?P<id>.*?)&ts=(?P<ts>.*)$'
  598. m_url = re.match(re_url, initial_url)
  599. #We build the url we will use to get the final track url
  600. # This url is build in Bandcamp in the script download_bunde_*.js
  601. request_url = '%s/statdownload/track?enc=mp3-320&fsig=%s&id=%s&ts=%s&.rand=665028774616&.vrs=1' % (m_url.group('server'), m_url.group('fsig'), id, m_url.group('ts'))
  602. final_url_webpage = self._download_webpage(request_url, id, 'Requesting download url')
  603. # If we could correctly generate the .rand field the url would be
  604. #in the "download_url" key
  605. final_url = re.search(r'"retry_url":"(.*?)"', final_url_webpage).group(1)
  606. track_info = {'id':id,
  607. 'title' : info[u'title'],
  608. 'ext' : 'mp3',
  609. 'url' : final_url,
  610. 'thumbnail' : info[u'thumb_url'],
  611. 'uploader' : info[u'artist']
  612. }
  613. return [track_info]
  614. class RedTubeIE(InfoExtractor):
  615. """Information Extractor for redtube"""
  616. _VALID_URL = r'(?:http://)?(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
  617. def _real_extract(self,url):
  618. mobj = re.match(self._VALID_URL, url)
  619. if mobj is None:
  620. raise ExtractorError(u'Invalid URL: %s' % url)
  621. video_id = mobj.group('id')
  622. video_extension = 'mp4'
  623. webpage = self._download_webpage(url, video_id)
  624. self.report_extraction(video_id)
  625. video_url = self._html_search_regex(r'<source src="(.+?)" type="video/mp4">',
  626. webpage, u'video URL')
  627. video_title = self._html_search_regex('<h1 class="videoTitle slidePanelMovable">(.+?)</h1>',
  628. webpage, u'title')
  629. return [{
  630. 'id': video_id,
  631. 'url': video_url,
  632. 'ext': video_extension,
  633. 'title': video_title,
  634. }]
  635. class InaIE(InfoExtractor):
  636. """Information Extractor for Ina.fr"""
  637. _VALID_URL = r'(?:http://)?(?:www\.)?ina\.fr/video/(?P<id>I[0-9]+)/.*'
  638. def _real_extract(self,url):
  639. mobj = re.match(self._VALID_URL, url)
  640. video_id = mobj.group('id')
  641. mrss_url='http://player.ina.fr/notices/%s.mrss' % video_id
  642. video_extension = 'mp4'
  643. webpage = self._download_webpage(mrss_url, video_id)
  644. self.report_extraction(video_id)
  645. video_url = self._html_search_regex(r'<media:player url="(?P<mp4url>http://mp4.ina.fr/[^"]+\.mp4)',
  646. webpage, u'video URL')
  647. video_title = self._search_regex(r'<title><!\[CDATA\[(?P<titre>.*?)]]></title>',
  648. webpage, u'title')
  649. return [{
  650. 'id': video_id,
  651. 'url': video_url,
  652. 'ext': video_extension,
  653. 'title': video_title,
  654. }]
  655. class HowcastIE(InfoExtractor):
  656. """Information Extractor for Howcast.com"""
  657. _VALID_URL = r'(?:https?://)?(?:www\.)?howcast\.com/videos/(?P<id>\d+)'
  658. def _real_extract(self, url):
  659. mobj = re.match(self._VALID_URL, url)
  660. video_id = mobj.group('id')
  661. webpage_url = 'http://www.howcast.com/videos/' + video_id
  662. webpage = self._download_webpage(webpage_url, video_id)
  663. self.report_extraction(video_id)
  664. video_url = self._search_regex(r'\'?file\'?: "(http://mobile-media\.howcast\.com/[0-9]+\.mp4)',
  665. webpage, u'video URL')
  666. video_title = self._html_search_regex(r'<meta content=(?:"([^"]+)"|\'([^\']+)\') property=\'og:title\'',
  667. webpage, u'title')
  668. video_description = self._html_search_regex(r'<meta content=(?:"([^"]+)"|\'([^\']+)\') name=\'description\'',
  669. webpage, u'description', fatal=False)
  670. thumbnail = self._html_search_regex(r'<meta content=\'(.+?)\' property=\'og:image\'',
  671. webpage, u'thumbnail', fatal=False)
  672. return [{
  673. 'id': video_id,
  674. 'url': video_url,
  675. 'ext': 'mp4',
  676. 'title': video_title,
  677. 'description': video_description,
  678. 'thumbnail': thumbnail,
  679. }]
  680. class VineIE(InfoExtractor):
  681. """Information Extractor for Vine.co"""
  682. _VALID_URL = r'(?:https?://)?(?:www\.)?vine\.co/v/(?P<id>\w+)'
  683. def _real_extract(self, url):
  684. mobj = re.match(self._VALID_URL, url)
  685. video_id = mobj.group('id')
  686. webpage_url = 'https://vine.co/v/' + video_id
  687. webpage = self._download_webpage(webpage_url, video_id)
  688. self.report_extraction(video_id)
  689. video_url = self._html_search_regex(r'<meta property="twitter:player:stream" content="(.+?)"',
  690. webpage, u'video URL')
  691. video_title = self._html_search_regex(r'<meta property="og:title" content="(.+?)"',
  692. webpage, u'title')
  693. thumbnail = self._html_search_regex(r'<meta property="og:image" content="(.+?)(\?.*?)?"',
  694. webpage, u'thumbnail', fatal=False)
  695. uploader = self._html_search_regex(r'<div class="user">.*?<h2>(.+?)</h2>',
  696. webpage, u'uploader', fatal=False, flags=re.DOTALL)
  697. return [{
  698. 'id': video_id,
  699. 'url': video_url,
  700. 'ext': 'mp4',
  701. 'title': video_title,
  702. 'thumbnail': thumbnail,
  703. 'uploader': uploader,
  704. }]
  705. class FlickrIE(InfoExtractor):
  706. """Information Extractor for Flickr videos"""
  707. _VALID_URL = r'(?:https?://)?(?:www\.)?flickr\.com/photos/(?P<uploader_id>[\w\-_@]+)/(?P<id>\d+).*'
  708. def _real_extract(self, url):
  709. mobj = re.match(self._VALID_URL, url)
  710. video_id = mobj.group('id')
  711. video_uploader_id = mobj.group('uploader_id')
  712. webpage_url = 'http://www.flickr.com/photos/' + video_uploader_id + '/' + video_id
  713. webpage = self._download_webpage(webpage_url, video_id)
  714. secret = self._search_regex(r"photo_secret: '(\w+)'", webpage, u'secret')
  715. first_url = 'https://secure.flickr.com/apps/video/video_mtl_xml.gne?v=x&photo_id=' + video_id + '&secret=' + secret + '&bitrate=700&target=_self'
  716. first_xml = self._download_webpage(first_url, video_id, 'Downloading first data webpage')
  717. node_id = self._html_search_regex(r'<Item id="id">(\d+-\d+)</Item>',
  718. first_xml, u'node_id')
  719. second_url = 'https://secure.flickr.com/video_playlist.gne?node_id=' + node_id + '&tech=flash&mode=playlist&bitrate=700&secret=' + secret + '&rd=video.yahoo.com&noad=1'
  720. second_xml = self._download_webpage(second_url, video_id, 'Downloading second data webpage')
  721. self.report_extraction(video_id)
  722. mobj = re.search(r'<STREAM APP="(.+?)" FULLPATH="(.+?)"', second_xml)
  723. if mobj is None:
  724. raise ExtractorError(u'Unable to extract video url')
  725. video_url = mobj.group(1) + unescapeHTML(mobj.group(2))
  726. video_title = self._html_search_regex(r'<meta property="og:title" content=(?:"([^"]+)"|\'([^\']+)\')',
  727. webpage, u'video title')
  728. video_description = self._html_search_regex(r'<meta property="og:description" content=(?:"([^"]+)"|\'([^\']+)\')',
  729. webpage, u'description', fatal=False)
  730. thumbnail = self._html_search_regex(r'<meta property="og:image" content=(?:"([^"]+)"|\'([^\']+)\')',
  731. webpage, u'thumbnail', fatal=False)
  732. return [{
  733. 'id': video_id,
  734. 'url': video_url,
  735. 'ext': 'mp4',
  736. 'title': video_title,
  737. 'description': video_description,
  738. 'thumbnail': thumbnail,
  739. 'uploader_id': video_uploader_id,
  740. }]
  741. class TeamcocoIE(InfoExtractor):
  742. _VALID_URL = r'http://teamcoco\.com/video/(?P<url_title>.*)'
  743. def _real_extract(self, url):
  744. mobj = re.match(self._VALID_URL, url)
  745. if mobj is None:
  746. raise ExtractorError(u'Invalid URL: %s' % url)
  747. url_title = mobj.group('url_title')
  748. webpage = self._download_webpage(url, url_title)
  749. video_id = self._html_search_regex(r'<article class="video" data-id="(\d+?)"',
  750. webpage, u'video id')
  751. self.report_extraction(video_id)
  752. video_title = self._html_search_regex(r'<meta property="og:title" content="(.+?)"',
  753. webpage, u'title')
  754. thumbnail = self._html_search_regex(r'<meta property="og:image" content="(.+?)"',
  755. webpage, u'thumbnail', fatal=False)
  756. video_description = self._html_search_regex(r'<meta property="og:description" content="(.*?)"',
  757. webpage, u'description', fatal=False)
  758. data_url = 'http://teamcoco.com/cvp/2.0/%s.xml' % video_id
  759. data = self._download_webpage(data_url, video_id, 'Downloading data webpage')
  760. video_url = self._html_search_regex(r'<file type="high".*?>(.*?)</file>',
  761. data, u'video URL')
  762. return [{
  763. 'id': video_id,
  764. 'url': video_url,
  765. 'ext': 'mp4',
  766. 'title': video_title,
  767. 'thumbnail': thumbnail,
  768. 'description': video_description,
  769. }]
  770. class XHamsterIE(InfoExtractor):
  771. """Information Extractor for xHamster"""
  772. _VALID_URL = r'(?:http://)?(?:www.)?xhamster\.com/movies/(?P<id>[0-9]+)/.*\.html'
  773. def _real_extract(self,url):
  774. mobj = re.match(self._VALID_URL, url)
  775. video_id = mobj.group('id')
  776. mrss_url = 'http://xhamster.com/movies/%s/.html' % video_id
  777. webpage = self._download_webpage(mrss_url, video_id)
  778. mobj = re.search(r'\'srv\': \'(?P<server>[^\']*)\',\s*\'file\': \'(?P<file>[^\']+)\',', webpage)
  779. if mobj is None:
  780. raise ExtractorError(u'Unable to extract media URL')
  781. if len(mobj.group('server')) == 0:
  782. video_url = compat_urllib_parse.unquote(mobj.group('file'))
  783. else:
  784. video_url = mobj.group('server')+'/key='+mobj.group('file')
  785. video_extension = video_url.split('.')[-1]
  786. video_title = self._html_search_regex(r'<title>(?P<title>.+?) - xHamster\.com</title>',
  787. webpage, u'title')
  788. # Can't see the description anywhere in the UI
  789. # video_description = self._html_search_regex(r'<span>Description: </span>(?P<description>[^<]+)',
  790. # webpage, u'description', fatal=False)
  791. # if video_description: video_description = unescapeHTML(video_description)
  792. mobj = re.search(r'hint=\'(?P<upload_date_Y>[0-9]{4})-(?P<upload_date_m>[0-9]{2})-(?P<upload_date_d>[0-9]{2}) [0-9]{2}:[0-9]{2}:[0-9]{2} [A-Z]{3,4}\'', webpage)
  793. if mobj:
  794. video_upload_date = mobj.group('upload_date_Y')+mobj.group('upload_date_m')+mobj.group('upload_date_d')
  795. else:
  796. video_upload_date = None
  797. self._downloader.report_warning(u'Unable to extract upload date')
  798. video_uploader_id = self._html_search_regex(r'<a href=\'/user/[^>]+>(?P<uploader_id>[^<]+)',
  799. webpage, u'uploader id', default=u'anonymous')
  800. video_thumbnail = self._search_regex(r'\'image\':\'(?P<thumbnail>[^\']+)\'',
  801. webpage, u'thumbnail', fatal=False)
  802. return [{
  803. 'id': video_id,
  804. 'url': video_url,
  805. 'ext': video_extension,
  806. 'title': video_title,
  807. # 'description': video_description,
  808. 'upload_date': video_upload_date,
  809. 'uploader_id': video_uploader_id,
  810. 'thumbnail': video_thumbnail
  811. }]
  812. class HypemIE(InfoExtractor):
  813. """Information Extractor for hypem"""
  814. _VALID_URL = r'(?:http://)?(?:www\.)?hypem\.com/track/([^/]+)/([^/]+)'
  815. def _real_extract(self, url):
  816. mobj = re.match(self._VALID_URL, url)
  817. if mobj is None:
  818. raise ExtractorError(u'Invalid URL: %s' % url)
  819. track_id = mobj.group(1)
  820. data = { 'ax': 1, 'ts': time.time() }
  821. data_encoded = compat_urllib_parse.urlencode(data)
  822. complete_url = url + "?" + data_encoded
  823. request = compat_urllib_request.Request(complete_url)
  824. response, urlh = self._download_webpage_handle(request, track_id, u'Downloading webpage with the url')
  825. cookie = urlh.headers.get('Set-Cookie', '')
  826. self.report_extraction(track_id)
  827. html_tracks = self._html_search_regex(r'<script type="application/json" id="displayList-data">(.*?)</script>',
  828. response, u'tracks', flags=re.MULTILINE|re.DOTALL).strip()
  829. try:
  830. track_list = json.loads(html_tracks)
  831. track = track_list[u'tracks'][0]
  832. except ValueError:
  833. raise ExtractorError(u'Hypemachine contained invalid JSON.')
  834. key = track[u"key"]
  835. track_id = track[u"id"]
  836. artist = track[u"artist"]
  837. title = track[u"song"]
  838. serve_url = "http://hypem.com/serve/source/%s/%s" % (compat_str(track_id), compat_str(key))
  839. request = compat_urllib_request.Request(serve_url, "" , {'Content-Type': 'application/json'})
  840. request.add_header('cookie', cookie)
  841. song_data_json = self._download_webpage(request, track_id, u'Downloading metadata')
  842. try:
  843. song_data = json.loads(song_data_json)
  844. except ValueError:
  845. raise ExtractorError(u'Hypemachine contained invalid JSON.')
  846. final_url = song_data[u"url"]
  847. return [{
  848. 'id': track_id,
  849. 'url': final_url,
  850. 'ext': "mp3",
  851. 'title': title,
  852. 'artist': artist,
  853. }]
  854. class Vbox7IE(InfoExtractor):
  855. """Information Extractor for Vbox7"""
  856. _VALID_URL = r'(?:http://)?(?:www\.)?vbox7\.com/play:([^/]+)'
  857. def _real_extract(self,url):
  858. mobj = re.match(self._VALID_URL, url)
  859. if mobj is None:
  860. raise ExtractorError(u'Invalid URL: %s' % url)
  861. video_id = mobj.group(1)
  862. redirect_page, urlh = self._download_webpage_handle(url, video_id)
  863. new_location = self._search_regex(r'window\.location = \'(.*)\';', redirect_page, u'redirect location')
  864. redirect_url = urlh.geturl() + new_location
  865. webpage = self._download_webpage(redirect_url, video_id, u'Downloading redirect page')
  866. title = self._html_search_regex(r'<title>(.*)</title>',
  867. webpage, u'title').split('/')[0].strip()
  868. ext = "flv"
  869. info_url = "http://vbox7.com/play/magare.do"
  870. data = compat_urllib_parse.urlencode({'as3':'1','vid':video_id})
  871. info_request = compat_urllib_request.Request(info_url, data)
  872. info_request.add_header('Content-Type', 'application/x-www-form-urlencoded')
  873. info_response = self._download_webpage(info_request, video_id, u'Downloading info webpage')
  874. if info_response is None:
  875. raise ExtractorError(u'Unable to extract the media url')
  876. (final_url, thumbnail_url) = map(lambda x: x.split('=')[1], info_response.split('&'))
  877. return [{
  878. 'id': video_id,
  879. 'url': final_url,
  880. 'ext': ext,
  881. 'title': title,
  882. 'thumbnail': thumbnail_url,
  883. }]
  884. def gen_extractors():
  885. """ Return a list of an instance of every supported extractor.
  886. The order does matter; the first extractor matched is the one handling the URL.
  887. """
  888. return [
  889. YoutubePlaylistIE(),
  890. YoutubeChannelIE(),
  891. YoutubeUserIE(),
  892. YoutubeSearchIE(),
  893. YoutubeIE(),
  894. MetacafeIE(),
  895. DailymotionIE(),
  896. GoogleSearchIE(),
  897. PhotobucketIE(),
  898. YahooIE(),
  899. YahooSearchIE(),
  900. DepositFilesIE(),
  901. FacebookIE(),
  902. BlipTVIE(),
  903. BlipTVUserIE(),
  904. VimeoIE(),
  905. MyVideoIE(),
  906. ComedyCentralIE(),
  907. EscapistIE(),
  908. CollegeHumorIE(),
  909. XVideosIE(),
  910. SoundcloudSetIE(),
  911. SoundcloudIE(),
  912. InfoQIE(),
  913. MixcloudIE(),
  914. StanfordOpenClassroomIE(),
  915. MTVIE(),
  916. YoukuIE(),
  917. XNXXIE(),
  918. YouJizzIE(),
  919. PornotubeIE(),
  920. YouPornIE(),
  921. GooglePlusIE(),
  922. ArteTvIE(),
  923. NBAIE(),
  924. WorldStarHipHopIE(),
  925. JustinTVIE(),
  926. FunnyOrDieIE(),
  927. SteamIE(),
  928. UstreamIE(),
  929. RBMARadioIE(),
  930. EightTracksIE(),
  931. KeekIE(),
  932. TEDIE(),
  933. MySpassIE(),
  934. SpiegelIE(),
  935. LiveLeakIE(),
  936. ARDIE(),
  937. ZDFIE(),
  938. TumblrIE(),
  939. BandcampIE(),
  940. RedTubeIE(),
  941. InaIE(),
  942. HowcastIE(),
  943. VineIE(),
  944. FlickrIE(),
  945. TeamcocoIE(),
  946. XHamsterIE(),
  947. HypemIE(),
  948. Vbox7IE(),
  949. GametrailersIE(),
  950. StatigramIE(),
  951. GenericIE()
  952. ]
  953. def get_info_extractor(ie_name):
  954. """Returns the info extractor class with the given ie_name"""
  955. return globals()[ie_name+'IE']