You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3163 lines
128 KiB

10 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
11 years ago
11 years ago
11 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
Switch codebase to use sanitized_Request instead of compat_urllib_request.Request [downloader/dash] Use sanitized_Request [downloader/http] Use sanitized_Request [atresplayer] Use sanitized_Request [bambuser] Use sanitized_Request [bliptv] Use sanitized_Request [brightcove] Use sanitized_Request [cbs] Use sanitized_Request [ceskatelevize] Use sanitized_Request [collegerama] Use sanitized_Request [extractor/common] Use sanitized_Request [crunchyroll] Use sanitized_Request [dailymotion] Use sanitized_Request [dcn] Use sanitized_Request [dramafever] Use sanitized_Request [dumpert] Use sanitized_Request [eitb] Use sanitized_Request [escapist] Use sanitized_Request [everyonesmixtape] Use sanitized_Request [extremetube] Use sanitized_Request [facebook] Use sanitized_Request [fc2] Use sanitized_Request [flickr] Use sanitized_Request [4tube] Use sanitized_Request [gdcvault] Use sanitized_Request [extractor/generic] Use sanitized_Request [hearthisat] Use sanitized_Request [hotnewhiphop] Use sanitized_Request [hypem] Use sanitized_Request [iprima] Use sanitized_Request [ivi] Use sanitized_Request [keezmovies] Use sanitized_Request [letv] Use sanitized_Request [lynda] Use sanitized_Request [metacafe] Use sanitized_Request [minhateca] Use sanitized_Request [miomio] Use sanitized_Request [meovideo] Use sanitized_Request [mofosex] Use sanitized_Request [moniker] Use sanitized_Request [mooshare] Use sanitized_Request [movieclips] Use sanitized_Request [mtv] Use sanitized_Request [myvideo] Use sanitized_Request [neteasemusic] Use sanitized_Request [nfb] Use sanitized_Request [niconico] Use sanitized_Request [noco] Use sanitized_Request [nosvideo] Use sanitized_Request [novamov] Use sanitized_Request [nowness] Use sanitized_Request [nuvid] Use sanitized_Request [played] Use sanitized_Request [pluralsight] Use sanitized_Request [pornhub] Use sanitized_Request [pornotube] Use sanitized_Request [primesharetv] Use sanitized_Request [promptfile] Use sanitized_Request [qqmusic] Use sanitized_Request [rtve] Use sanitized_Request [safari] Use sanitized_Request [sandia] Use sanitized_Request [shared] Use sanitized_Request [sharesix] Use sanitized_Request [sina] Use sanitized_Request [smotri] Use sanitized_Request [sohu] Use sanitized_Request [spankwire] Use sanitized_Request [sportdeutschland] Use sanitized_Request [streamcloud] Use sanitized_Request [streamcz] Use sanitized_Request [tapely] Use sanitized_Request [tube8] Use sanitized_Request [tubitv] Use sanitized_Request [twitch] Use sanitized_Request [twitter] Use sanitized_Request [udemy] Use sanitized_Request [vbox7] Use sanitized_Request [veoh] Use sanitized_Request [vessel] Use sanitized_Request [vevo] Use sanitized_Request [viddler] Use sanitized_Request [videomega] Use sanitized_Request [viewvster] Use sanitized_Request [viki] Use sanitized_Request [vk] Use sanitized_Request [vodlocker] Use sanitized_Request [voicerepublic] Use sanitized_Request [wistia] Use sanitized_Request [xfileshare] Use sanitized_Request [xtube] Use sanitized_Request [xvideos] Use sanitized_Request [yandexmusic] Use sanitized_Request [youku] Use sanitized_Request [youporn] Use sanitized_Request [youtube] Use sanitized_Request [patreon] Use sanitized_Request [extractor/common] Remove unused import [nfb] PEP 8
9 years ago
10 years ago
10 years ago
  1. # coding: utf-8
  2. from __future__ import unicode_literals
  3. import os
  4. import re
  5. import sys
  6. from .common import InfoExtractor
  7. from .youtube import YoutubeIE
  8. from ..compat import (
  9. compat_etree_fromstring,
  10. compat_str,
  11. compat_urllib_parse_unquote,
  12. compat_urlparse,
  13. compat_xml_parse_error,
  14. )
  15. from ..utils import (
  16. determine_ext,
  17. ExtractorError,
  18. float_or_none,
  19. HEADRequest,
  20. is_html,
  21. js_to_json,
  22. KNOWN_EXTENSIONS,
  23. mimetype2ext,
  24. orderedSet,
  25. sanitized_Request,
  26. smuggle_url,
  27. unescapeHTML,
  28. unified_strdate,
  29. unsmuggle_url,
  30. UnsupportedError,
  31. xpath_text,
  32. )
  33. from .commonprotocols import RtmpIE
  34. from .brightcove import (
  35. BrightcoveLegacyIE,
  36. BrightcoveNewIE,
  37. )
  38. from .nexx import (
  39. NexxIE,
  40. NexxEmbedIE,
  41. )
  42. from .nbc import NBCSportsVPlayerIE
  43. from .ooyala import OoyalaIE
  44. from .rutv import RUTVIE
  45. from .tvc import TVCIE
  46. from .sportbox import SportBoxEmbedIE
  47. from .smotri import SmotriIE
  48. from .myvi import MyviIE
  49. from .condenast import CondeNastIE
  50. from .udn import UDNEmbedIE
  51. from .senateisvp import SenateISVPIE
  52. from .svt import SVTIE
  53. from .pornhub import PornHubIE
  54. from .xhamster import XHamsterEmbedIE
  55. from .tnaflix import TNAFlixNetworkEmbedIE
  56. from .drtuber import DrTuberIE
  57. from .redtube import RedTubeIE
  58. from .vimeo import VimeoIE
  59. from .dailymotion import DailymotionIE
  60. from .dailymail import DailyMailIE
  61. from .onionstudios import OnionStudiosIE
  62. from .viewlift import ViewLiftEmbedIE
  63. from .mtv import MTVServicesEmbeddedIE
  64. from .pladform import PladformIE
  65. from .videomore import VideomoreIE
  66. from .webcaster import WebcasterFeedIE
  67. from .googledrive import GoogleDriveIE
  68. from .jwplatform import JWPlatformIE
  69. from .digiteka import DigitekaIE
  70. from .arkena import ArkenaIE
  71. from .instagram import InstagramIE
  72. from .liveleak import LiveLeakIE
  73. from .threeqsdn import ThreeQSDNIE
  74. from .theplatform import ThePlatformIE
  75. from .vessel import VesselIE
  76. from .kaltura import KalturaIE
  77. from .eagleplatform import EaglePlatformIE
  78. from .facebook import FacebookIE
  79. from .soundcloud import SoundcloudIE
  80. from .tunein import TuneInBaseIE
  81. from .vbox7 import Vbox7IE
  82. from .dbtv import DBTVIE
  83. from .piksel import PikselIE
  84. from .videa import VideaIE
  85. from .twentymin import TwentyMinutenIE
  86. from .ustream import UstreamIE
  87. from .openload import OpenloadIE
  88. from .videopress import VideoPressIE
  89. from .rutube import RutubeIE
  90. from .limelight import LimelightBaseIE
  91. from .anvato import AnvatoIE
  92. from .washingtonpost import WashingtonPostIE
  93. from .wistia import WistiaIE
  94. from .mediaset import MediasetIE
  95. from .joj import JojIE
  96. from .megaphone import MegaphoneIE
  97. from .vzaar import VzaarIE
  98. from .channel9 import Channel9IE
  99. from .vshare import VShareIE
  100. from .mediasite import MediasiteIE
  101. class GenericIE(InfoExtractor):
  102. IE_DESC = 'Generic downloader that works on some sites'
  103. _VALID_URL = r'.*'
  104. IE_NAME = 'generic'
  105. _TESTS = [
  106. # Direct link to a video
  107. {
  108. 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
  109. 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
  110. 'info_dict': {
  111. 'id': 'trailer',
  112. 'ext': 'mp4',
  113. 'title': 'trailer',
  114. 'upload_date': '20100513',
  115. }
  116. },
  117. # Direct link to media delivered compressed (until Accept-Encoding is *)
  118. {
  119. 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
  120. 'md5': '128c42e68b13950268b648275386fc74',
  121. 'info_dict': {
  122. 'id': 'FictionJunction-Parallel_Hearts',
  123. 'ext': 'flac',
  124. 'title': 'FictionJunction-Parallel_Hearts',
  125. 'upload_date': '20140522',
  126. },
  127. 'expected_warnings': [
  128. 'URL could be a direct video link, returning it as such.'
  129. ],
  130. 'skip': 'URL invalid',
  131. },
  132. # Direct download with broken HEAD
  133. {
  134. 'url': 'http://ai-radio.org:8000/radio.opus',
  135. 'info_dict': {
  136. 'id': 'radio',
  137. 'ext': 'opus',
  138. 'title': 'radio',
  139. },
  140. 'params': {
  141. 'skip_download': True, # infinite live stream
  142. },
  143. 'expected_warnings': [
  144. r'501.*Not Implemented',
  145. r'400.*Bad Request',
  146. ],
  147. },
  148. # Direct link with incorrect MIME type
  149. {
  150. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  151. 'md5': '4ccbebe5f36706d85221f204d7eb5913',
  152. 'info_dict': {
  153. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  154. 'id': '5_Lennart_Poettering_-_Systemd',
  155. 'ext': 'webm',
  156. 'title': '5_Lennart_Poettering_-_Systemd',
  157. 'upload_date': '20141120',
  158. },
  159. 'expected_warnings': [
  160. 'URL could be a direct video link, returning it as such.'
  161. ]
  162. },
  163. # RSS feed
  164. {
  165. 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  166. 'info_dict': {
  167. 'id': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  168. 'title': 'Zero Punctuation',
  169. 'description': 're:.*groundbreaking video review series.*'
  170. },
  171. 'playlist_mincount': 11,
  172. },
  173. # RSS feed with enclosure
  174. {
  175. 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  176. 'info_dict': {
  177. 'id': 'pdv_maddow_netcast_m4v-02-27-2015-201624',
  178. 'ext': 'm4v',
  179. 'upload_date': '20150228',
  180. 'title': 'pdv_maddow_netcast_m4v-02-27-2015-201624',
  181. }
  182. },
  183. # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
  184. {
  185. 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
  186. 'info_dict': {
  187. 'id': 'smil',
  188. 'ext': 'mp4',
  189. 'title': 'Automatics, robotics and biocybernetics',
  190. 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
  191. 'upload_date': '20130627',
  192. 'formats': 'mincount:16',
  193. 'subtitles': 'mincount:1',
  194. },
  195. 'params': {
  196. 'force_generic_extractor': True,
  197. 'skip_download': True,
  198. },
  199. },
  200. # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
  201. {
  202. 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
  203. 'info_dict': {
  204. 'id': 'hds',
  205. 'ext': 'flv',
  206. 'title': 'hds',
  207. 'formats': 'mincount:1',
  208. },
  209. 'params': {
  210. 'skip_download': True,
  211. },
  212. },
  213. # SMIL from https://www.restudy.dk/video/play/id/1637
  214. {
  215. 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
  216. 'info_dict': {
  217. 'id': 'video_1637',
  218. 'ext': 'flv',
  219. 'title': 'video_1637',
  220. 'formats': 'mincount:3',
  221. },
  222. 'params': {
  223. 'skip_download': True,
  224. },
  225. },
  226. # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
  227. {
  228. 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
  229. 'info_dict': {
  230. 'id': 'smil-service',
  231. 'ext': 'flv',
  232. 'title': 'smil-service',
  233. 'formats': 'mincount:1',
  234. },
  235. 'params': {
  236. 'skip_download': True,
  237. },
  238. },
  239. # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
  240. {
  241. 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
  242. 'info_dict': {
  243. 'id': '4719370',
  244. 'ext': 'mp4',
  245. 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
  246. 'formats': 'mincount:3',
  247. },
  248. 'params': {
  249. 'skip_download': True,
  250. },
  251. },
  252. # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
  253. {
  254. 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
  255. 'info_dict': {
  256. 'id': 'mZlp2ctYIUEB',
  257. 'ext': 'mp4',
  258. 'title': 'Tikibad ontruimd wegens brand',
  259. 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
  260. 'thumbnail': r're:^https?://.*\.jpg$',
  261. 'duration': 33,
  262. },
  263. 'params': {
  264. 'skip_download': True,
  265. },
  266. },
  267. # MPD from http://dash-mse-test.appspot.com/media.html
  268. {
  269. 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
  270. 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
  271. 'info_dict': {
  272. 'id': 'car-20120827-manifest',
  273. 'ext': 'mp4',
  274. 'title': 'car-20120827-manifest',
  275. 'formats': 'mincount:9',
  276. 'upload_date': '20130904',
  277. },
  278. 'params': {
  279. 'format': 'bestvideo',
  280. },
  281. },
  282. # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
  283. {
  284. 'url': 'http://once.unicornmedia.com/now/master/playlist/bb0b18ba-64f5-4b1b-a29f-0ac252f06b68/77a785f3-5188-4806-b788-0893a61634ed/93677179-2d99-4ef4-9e17-fe70d49abfbf/content.m3u8',
  285. 'info_dict': {
  286. 'id': 'content',
  287. 'ext': 'mp4',
  288. 'title': 'content',
  289. 'formats': 'mincount:8',
  290. },
  291. 'params': {
  292. # m3u8 downloads
  293. 'skip_download': True,
  294. },
  295. 'skip': 'video gone',
  296. },
  297. # m3u8 served with Content-Type: text/plain
  298. {
  299. 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
  300. 'info_dict': {
  301. 'id': 'index',
  302. 'ext': 'mp4',
  303. 'title': 'index',
  304. 'upload_date': '20140720',
  305. 'formats': 'mincount:11',
  306. },
  307. 'params': {
  308. # m3u8 downloads
  309. 'skip_download': True,
  310. },
  311. 'skip': 'video gone',
  312. },
  313. # google redirect
  314. {
  315. 'url': 'http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCUQtwIwAA&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcmQHVoWB5FY&ei=F-sNU-LLCaXk4QT52ICQBQ&usg=AFQjCNEw4hL29zgOohLXvpJ-Bdh2bils1Q&bvm=bv.61965928,d.bGE',
  316. 'info_dict': {
  317. 'id': 'cmQHVoWB5FY',
  318. 'ext': 'mp4',
  319. 'upload_date': '20130224',
  320. 'uploader_id': 'TheVerge',
  321. 'description': r're:^Chris Ziegler takes a look at the\.*',
  322. 'uploader': 'The Verge',
  323. 'title': 'First Firefox OS phones side-by-side',
  324. },
  325. 'params': {
  326. 'skip_download': False,
  327. }
  328. },
  329. {
  330. # redirect in Refresh HTTP header
  331. 'url': 'https://www.facebook.com/l.php?u=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpO8h3EaFRdo&h=TAQHsoToz&enc=AZN16h-b6o4Zq9pZkCCdOLNKMN96BbGMNtcFwHSaazus4JHT_MFYkAA-WARTX2kvsCIdlAIyHZjl6d33ILIJU7Jzwk_K3mcenAXoAzBNoZDI_Q7EXGDJnIhrGkLXo_LJ_pAa2Jzbx17UHMd3jAs--6j2zaeto5w9RTn8T_1kKg3fdC5WPX9Dbb18vzH7YFX0eSJmoa6SP114rvlkw6pkS1-T&s=1',
  332. 'info_dict': {
  333. 'id': 'pO8h3EaFRdo',
  334. 'ext': 'mp4',
  335. 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
  336. 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
  337. 'upload_date': '20150917',
  338. 'uploader_id': 'brtvofficial',
  339. 'uploader': 'Boiler Room',
  340. },
  341. 'params': {
  342. 'skip_download': False,
  343. },
  344. },
  345. {
  346. 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
  347. 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
  348. 'info_dict': {
  349. 'id': '13601338388002',
  350. 'ext': 'mp4',
  351. 'uploader': 'www.hodiho.fr',
  352. 'title': 'R\u00e9gis plante sa Jeep',
  353. }
  354. },
  355. # bandcamp page with custom domain
  356. {
  357. 'add_ie': ['Bandcamp'],
  358. 'url': 'http://bronyrock.com/track/the-pony-mash',
  359. 'info_dict': {
  360. 'id': '3235767654',
  361. 'ext': 'mp3',
  362. 'title': 'The Pony Mash',
  363. 'uploader': 'M_Pallante',
  364. },
  365. 'skip': 'There is a limit of 200 free downloads / month for the test song',
  366. },
  367. {
  368. # embedded brightcove video
  369. # it also tests brightcove videos that need to set the 'Referer'
  370. # in the http requests
  371. 'add_ie': ['BrightcoveLegacy'],
  372. 'url': 'http://www.bfmtv.com/video/bfmbusiness/cours-bourse/cours-bourse-l-analyse-technique-154522/',
  373. 'info_dict': {
  374. 'id': '2765128793001',
  375. 'ext': 'mp4',
  376. 'title': 'Le cours de bourse : l’analyse technique',
  377. 'description': 'md5:7e9ad046e968cb2d1114004aba466fd9',
  378. 'uploader': 'BFM BUSINESS',
  379. },
  380. 'params': {
  381. 'skip_download': True,
  382. },
  383. },
  384. {
  385. # embedded with itemprop embedURL and video id spelled as `idVideo`
  386. 'add_id': ['BrightcoveLegacy'],
  387. 'url': 'http://bfmbusiness.bfmtv.com/mediaplayer/chroniques/olivier-delamarche/',
  388. 'info_dict': {
  389. 'id': '5255628253001',
  390. 'ext': 'mp4',
  391. 'title': 'md5:37c519b1128915607601e75a87995fc0',
  392. 'description': 'md5:37f7f888b434bb8f8cc8dbd4f7a4cf26',
  393. 'uploader': 'BFM BUSINESS',
  394. 'uploader_id': '876450612001',
  395. 'timestamp': 1482255315,
  396. 'upload_date': '20161220',
  397. },
  398. 'params': {
  399. 'skip_download': True,
  400. },
  401. },
  402. {
  403. # https://github.com/rg3/youtube-dl/issues/2253
  404. 'url': 'http://bcove.me/i6nfkrc3',
  405. 'md5': '0ba9446db037002366bab3b3eb30c88c',
  406. 'info_dict': {
  407. 'id': '3101154703001',
  408. 'ext': 'mp4',
  409. 'title': 'Still no power',
  410. 'uploader': 'thestar.com',
  411. 'description': 'Mississauga resident David Farmer is still out of power as a result of the ice storm a month ago. To keep the house warm, Farmer cuts wood from his property for a wood burning stove downstairs.',
  412. },
  413. 'add_ie': ['BrightcoveLegacy'],
  414. 'skip': 'video gone',
  415. },
  416. {
  417. 'url': 'http://www.championat.com/video/football/v/87/87499.html',
  418. 'md5': 'fb973ecf6e4a78a67453647444222983',
  419. 'info_dict': {
  420. 'id': '3414141473001',
  421. 'ext': 'mp4',
  422. 'title': 'Видео. Удаление Дзагоева (ЦСКА)',
  423. 'description': 'Онлайн-трансляция матча ЦСКА - "Волга"',
  424. 'uploader': 'Championat',
  425. },
  426. },
  427. {
  428. # https://github.com/rg3/youtube-dl/issues/3541
  429. 'add_ie': ['BrightcoveLegacy'],
  430. 'url': 'http://www.kijk.nl/sbs6/leermijvrouwenkennen/videos/jqMiXKAYan2S/aflevering-1',
  431. 'info_dict': {
  432. 'id': '3866516442001',
  433. 'ext': 'mp4',
  434. 'title': 'Leer mij vrouwen kennen: Aflevering 1',
  435. 'description': 'Leer mij vrouwen kennen: Aflevering 1',
  436. 'uploader': 'SBS Broadcasting',
  437. },
  438. 'skip': 'Restricted to Netherlands',
  439. 'params': {
  440. 'skip_download': True, # m3u8 download
  441. },
  442. },
  443. {
  444. # Brightcove video in <iframe>
  445. 'url': 'http://www.un.org/chinese/News/story.asp?NewsID=27724',
  446. 'md5': '36d74ef5e37c8b4a2ce92880d208b968',
  447. 'info_dict': {
  448. 'id': '5360463607001',
  449. 'ext': 'mp4',
  450. 'title': '叙利亚失明儿童在废墟上演唱《心跳》 呼吁获得正常童年生活',
  451. 'description': '联合国儿童基金会中东和北非区域大使、作曲家扎德·迪拉尼(Zade Dirani)在3月15日叙利亚冲突爆发7周年纪念日之际发布了为叙利亚谱写的歌曲《心跳》(HEARTBEAT),为受到六年冲突影响的叙利亚儿童发出强烈呐喊,呼吁世界做出共同努力,使叙利亚儿童重新获得享有正常童年生活的权利。',
  452. 'uploader': 'United Nations',
  453. 'uploader_id': '1362235914001',
  454. 'timestamp': 1489593889,
  455. 'upload_date': '20170315',
  456. },
  457. 'add_ie': ['BrightcoveLegacy'],
  458. },
  459. {
  460. # Brightcove with alternative playerID key
  461. 'url': 'http://www.nature.com/nmeth/journal/v9/n7/fig_tab/nmeth.2062_SV1.html',
  462. 'info_dict': {
  463. 'id': 'nmeth.2062_SV1',
  464. 'title': 'Simultaneous multiview imaging of the Drosophila syncytial blastoderm : Quantitative high-speed imaging of entire developing embryos with simultaneous multiview light-sheet microscopy : Nature Methods : Nature Research',
  465. },
  466. 'playlist': [{
  467. 'info_dict': {
  468. 'id': '2228375078001',
  469. 'ext': 'mp4',
  470. 'title': 'nmeth.2062-sv1',
  471. 'description': 'nmeth.2062-sv1',
  472. 'timestamp': 1363357591,
  473. 'upload_date': '20130315',
  474. 'uploader': 'Nature Publishing Group',
  475. 'uploader_id': '1964492299001',
  476. },
  477. }],
  478. },
  479. {
  480. # Brightcove with UUID in videoPlayer
  481. 'url': 'http://www8.hp.com/cn/zh/home.html',
  482. 'info_dict': {
  483. 'id': '5255815316001',
  484. 'ext': 'mp4',
  485. 'title': 'Sprocket Video - China',
  486. 'description': 'Sprocket Video - China',
  487. 'uploader': 'HP-Video Gallery',
  488. 'timestamp': 1482263210,
  489. 'upload_date': '20161220',
  490. 'uploader_id': '1107601872001',
  491. },
  492. 'params': {
  493. 'skip_download': True, # m3u8 download
  494. },
  495. 'skip': 'video rotates...weekly?',
  496. },
  497. {
  498. # Brightcove:new type [2].
  499. 'url': 'http://www.delawaresportszone.com/video-st-thomas-more-earns-first-trip-to-basketball-semis',
  500. 'md5': '2b35148fcf48da41c9fb4591650784f3',
  501. 'info_dict': {
  502. 'id': '5348741021001',
  503. 'ext': 'mp4',
  504. 'upload_date': '20170306',
  505. 'uploader_id': '4191638492001',
  506. 'timestamp': 1488769918,
  507. 'title': 'VIDEO: St. Thomas More earns first trip to basketball semis',
  508. },
  509. },
  510. {
  511. # Alternative brightcove <video> attributes
  512. 'url': 'http://www.programme-tv.net/videos/extraits/81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche/',
  513. 'info_dict': {
  514. 'id': '81095-guillaume-canet-evoque-les-rumeurs-d-infidelite-de-marion-cotillard-avec-brad-pitt-dans-vivement-dimanche',
  515. 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche, Extraits : toutes les vidéos avec Télé-Loisirs",
  516. },
  517. 'playlist': [{
  518. 'md5': '732d22ba3d33f2f3fc253c39f8f36523',
  519. 'info_dict': {
  520. 'id': '5311302538001',
  521. 'ext': 'mp4',
  522. 'title': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche",
  523. 'description': "Guillaume Canet évoque les rumeurs d'infidélité de Marion Cotillard avec Brad Pitt dans Vivement Dimanche (France 2, 5 février 2017)",
  524. 'timestamp': 1486321708,
  525. 'upload_date': '20170205',
  526. 'uploader_id': '800000640001',
  527. },
  528. 'only_matching': True,
  529. }],
  530. },
  531. {
  532. # Brightcove with UUID in videoPlayer
  533. 'url': 'http://www8.hp.com/cn/zh/home.html',
  534. 'info_dict': {
  535. 'id': '5255815316001',
  536. 'ext': 'mp4',
  537. 'title': 'Sprocket Video - China',
  538. 'description': 'Sprocket Video - China',
  539. 'uploader': 'HP-Video Gallery',
  540. 'timestamp': 1482263210,
  541. 'upload_date': '20161220',
  542. 'uploader_id': '1107601872001',
  543. },
  544. 'params': {
  545. 'skip_download': True, # m3u8 download
  546. },
  547. },
  548. # ooyala video
  549. {
  550. 'url': 'http://www.rollingstone.com/music/videos/norwegian-dj-cashmere-cat-goes-spartan-on-with-me-premiere-20131219',
  551. 'md5': '166dd577b433b4d4ebfee10b0824d8ff',
  552. 'info_dict': {
  553. 'id': 'BwY2RxaTrTkslxOfcan0UCf0YqyvWysJ',
  554. 'ext': 'mp4',
  555. 'title': '2cc213299525360.mov', # that's what we get
  556. 'duration': 238.231,
  557. },
  558. 'add_ie': ['Ooyala'],
  559. },
  560. {
  561. # ooyala video embedded with http://player.ooyala.com/iframe.js
  562. 'url': 'http://www.macrumors.com/2015/07/24/steve-jobs-the-man-in-the-machine-first-trailer/',
  563. 'info_dict': {
  564. 'id': 'p0MGJndjoG5SOKqO_hZJuZFPB-Tr5VgB',
  565. 'ext': 'mp4',
  566. 'title': '"Steve Jobs: Man in the Machine" trailer',
  567. 'description': 'The first trailer for the Alex Gibney documentary "Steve Jobs: Man in the Machine."',
  568. 'duration': 135.427,
  569. },
  570. 'params': {
  571. 'skip_download': True,
  572. },
  573. 'skip': 'movie expired',
  574. },
  575. # ooyala video embedded with http://player.ooyala.com/static/v4/production/latest/core.min.js
  576. {
  577. 'url': 'http://wnep.com/2017/07/22/steampunk-fest-comes-to-honesdale/',
  578. 'info_dict': {
  579. 'id': 'lwYWYxYzE6V5uJMjNGyKtwwiw9ZJD7t2',
  580. 'ext': 'mp4',
  581. 'title': 'Steampunk Fest Comes to Honesdale',
  582. 'duration': 43.276,
  583. },
  584. 'params': {
  585. 'skip_download': True,
  586. }
  587. },
  588. # embed.ly video
  589. {
  590. 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
  591. 'info_dict': {
  592. 'id': '9ODmcdjQcHQ',
  593. 'ext': 'mp4',
  594. 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
  595. 'upload_date': '20140225',
  596. 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
  597. 'uploader': 'Tested',
  598. 'uploader_id': 'testedcom',
  599. },
  600. # No need to test YoutubeIE here
  601. 'params': {
  602. 'skip_download': True,
  603. },
  604. },
  605. # funnyordie embed
  606. {
  607. 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
  608. 'info_dict': {
  609. 'id': '18e820ec3f',
  610. 'ext': 'mp4',
  611. 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
  612. 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
  613. },
  614. # HEAD requests lead to endless 301, while GET is OK
  615. 'expected_warnings': ['301'],
  616. },
  617. # RUTV embed
  618. {
  619. 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
  620. 'info_dict': {
  621. 'id': '776940',
  622. 'ext': 'mp4',
  623. 'title': 'Охотское море стало целиком российским',
  624. 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
  625. },
  626. 'params': {
  627. # m3u8 download
  628. 'skip_download': True,
  629. },
  630. },
  631. # TVC embed
  632. {
  633. 'url': 'http://sch1298sz.mskobr.ru/dou_edu/karamel_ki/filial_galleries/video/iframe_src_http_tvc_ru_video_iframe_id_55304_isplay_false_acc_video_id_channel_brand_id_11_show_episodes_episode_id_32307_frameb/',
  634. 'info_dict': {
  635. 'id': '55304',
  636. 'ext': 'mp4',
  637. 'title': 'Дошкольное воспитание',
  638. },
  639. },
  640. # SportBox embed
  641. {
  642. 'url': 'http://www.vestifinance.ru/articles/25753',
  643. 'info_dict': {
  644. 'id': '25753',
  645. 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
  646. },
  647. 'playlist': [{
  648. 'info_dict': {
  649. 'id': '370908',
  650. 'title': 'Госзаказ. День 3',
  651. 'ext': 'mp4',
  652. }
  653. }, {
  654. 'info_dict': {
  655. 'id': '370905',
  656. 'title': 'Госзаказ. День 2',
  657. 'ext': 'mp4',
  658. }
  659. }, {
  660. 'info_dict': {
  661. 'id': '370902',
  662. 'title': 'Госзаказ. День 1',
  663. 'ext': 'mp4',
  664. }
  665. }],
  666. 'params': {
  667. # m3u8 download
  668. 'skip_download': True,
  669. },
  670. },
  671. # Myvi.ru embed
  672. {
  673. 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
  674. 'info_dict': {
  675. 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
  676. 'ext': 'mp4',
  677. 'title': 'Ужастики, русский трейлер (2015)',
  678. 'thumbnail': r're:^https?://.*\.jpg$',
  679. 'duration': 153,
  680. }
  681. },
  682. # XHamster embed
  683. {
  684. 'url': 'http://www.numisc.com/forum/showthread.php?11696-FM15-which-pumiscer-was-this-%28-vid-%29-%28-alfa-as-fuck-srx-%29&s=711f5db534502e22260dec8c5e2d66d8',
  685. 'info_dict': {
  686. 'id': 'showthread',
  687. 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
  688. },
  689. 'playlist_mincount': 7,
  690. # This forum does not allow <iframe> syntaxes anymore
  691. # Now HTML tags are displayed as-is
  692. 'skip': 'No videos on this page',
  693. },
  694. # Embedded TED video
  695. {
  696. 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
  697. 'md5': '65fdff94098e4a607385a60c5177c638',
  698. 'info_dict': {
  699. 'id': '1969',
  700. 'ext': 'mp4',
  701. 'title': 'Hidden miracles of the natural world',
  702. 'uploader': 'Louie Schwartzberg',
  703. 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
  704. }
  705. },
  706. # nowvideo embed hidden behind percent encoding
  707. {
  708. 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
  709. 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
  710. 'info_dict': {
  711. 'id': '06e53103ca9aa',
  712. 'ext': 'flv',
  713. 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
  714. 'description': 'No description',
  715. },
  716. },
  717. # arte embed
  718. {
  719. 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
  720. 'md5': '7653032cbb25bf6c80d80f217055fa43',
  721. 'info_dict': {
  722. 'id': '048195-004_PLUS7-F',
  723. 'ext': 'flv',
  724. 'title': 'X:enius',
  725. 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
  726. 'upload_date': '20140320',
  727. },
  728. 'params': {
  729. 'skip_download': 'Requires rtmpdump'
  730. },
  731. 'skip': 'video gone',
  732. },
  733. # francetv embed
  734. {
  735. 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
  736. 'info_dict': {
  737. 'id': 'EV_30231',
  738. 'ext': 'mp4',
  739. 'title': 'Alcaline, le concert avec Calogero',
  740. 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
  741. 'upload_date': '20150226',
  742. 'timestamp': 1424989860,
  743. 'duration': 5400,
  744. },
  745. 'params': {
  746. # m3u8 downloads
  747. 'skip_download': True,
  748. },
  749. 'expected_warnings': [
  750. 'Forbidden'
  751. ]
  752. },
  753. # Condé Nast embed
  754. {
  755. 'url': 'http://www.wired.com/2014/04/honda-asimo/',
  756. 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
  757. 'info_dict': {
  758. 'id': '53501be369702d3275860000',
  759. 'ext': 'mp4',
  760. 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
  761. }
  762. },
  763. # Dailymotion embed
  764. {
  765. 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
  766. 'md5': '441aeeb82eb72c422c7f14ec533999cd',
  767. 'info_dict': {
  768. 'id': 'k2mm4bCdJ6CQ2i7c8o2',
  769. 'ext': 'mp4',
  770. 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
  771. 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
  772. 'uploader': 'Spi0n',
  773. 'uploader_id': 'xgditw',
  774. 'upload_date': '20140425',
  775. 'timestamp': 1398441542,
  776. },
  777. 'add_ie': ['Dailymotion'],
  778. },
  779. # DailyMail embed
  780. {
  781. 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
  782. 'info_dict': {
  783. 'id': '1495629',
  784. 'ext': 'mp4',
  785. 'title': 'Care worker punches elderly dementia patient in head 11 times',
  786. 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
  787. },
  788. 'add_ie': ['DailyMail'],
  789. 'params': {
  790. 'skip_download': True,
  791. },
  792. },
  793. # YouTube embed
  794. {
  795. 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
  796. 'info_dict': {
  797. 'id': 'FXRb4ykk4S0',
  798. 'ext': 'mp4',
  799. 'title': 'The NBL Auction 2014',
  800. 'uploader': 'BADMINTON England',
  801. 'uploader_id': 'BADMINTONEvents',
  802. 'upload_date': '20140603',
  803. 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
  804. },
  805. 'add_ie': ['Youtube'],
  806. 'params': {
  807. 'skip_download': True,
  808. }
  809. },
  810. # MTVSercices embed
  811. {
  812. 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
  813. 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
  814. 'info_dict': {
  815. 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
  816. 'ext': 'mp4',
  817. 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
  818. 'description': 'Two valets share their love for movie star Liam Neesons.',
  819. 'timestamp': 1349922600,
  820. 'upload_date': '20121011',
  821. },
  822. },
  823. # YouTube embed via <data-embed-url="">
  824. {
  825. 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
  826. 'info_dict': {
  827. 'id': '4vAffPZIT44',
  828. 'ext': 'mp4',
  829. 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
  830. 'uploader': 'Gameloft',
  831. 'uploader_id': 'gameloft',
  832. 'upload_date': '20140828',
  833. 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
  834. },
  835. 'params': {
  836. 'skip_download': True,
  837. }
  838. },
  839. # YouTube <object> embed
  840. {
  841. 'url': 'http://www.improbable.com/2017/04/03/untrained-modern-youths-and-ancient-masters-in-selfie-portraits/',
  842. 'md5': '516718101ec834f74318df76259fb3cc',
  843. 'info_dict': {
  844. 'id': 'msN87y-iEx0',
  845. 'ext': 'webm',
  846. 'title': 'Feynman: Mirrors FUN TO IMAGINE 6',
  847. 'upload_date': '20080526',
  848. 'description': 'md5:0ffc78ea3f01b2e2c247d5f8d1d3c18d',
  849. 'uploader': 'Christopher Sykes',
  850. 'uploader_id': 'ChristopherJSykes',
  851. },
  852. 'add_ie': ['Youtube'],
  853. },
  854. # Camtasia studio
  855. {
  856. 'url': 'http://www.ll.mit.edu/workshops/education/videocourses/antennas/lecture1/video/',
  857. 'playlist': [{
  858. 'md5': '0c5e352edabf715d762b0ad4e6d9ee67',
  859. 'info_dict': {
  860. 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
  861. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - video1',
  862. 'ext': 'flv',
  863. 'duration': 2235.90,
  864. }
  865. }, {
  866. 'md5': '10e4bb3aaca9fd630e273ff92d9f3c63',
  867. 'info_dict': {
  868. 'id': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final_PIP',
  869. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final - pip',
  870. 'ext': 'flv',
  871. 'duration': 2235.93,
  872. }
  873. }],
  874. 'info_dict': {
  875. 'title': 'Fenn-AA_PA_Radar_Course_Lecture_1c_Final',
  876. }
  877. },
  878. # Flowplayer
  879. {
  880. 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
  881. 'md5': '9d65602bf31c6e20014319c7d07fba27',
  882. 'info_dict': {
  883. 'id': '5123ea6d5e5a7',
  884. 'ext': 'mp4',
  885. 'age_limit': 18,
  886. 'uploader': 'www.handjobhub.com',
  887. 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
  888. }
  889. },
  890. # Multiple brightcove videos
  891. # https://github.com/rg3/youtube-dl/issues/2283
  892. {
  893. 'url': 'http://www.newyorker.com/online/blogs/newsdesk/2014/01/always-never-nuclear-command-and-control.html',
  894. 'info_dict': {
  895. 'id': 'always-never',
  896. 'title': 'Always / Never - The New Yorker',
  897. },
  898. 'playlist_count': 3,
  899. 'params': {
  900. 'extract_flat': False,
  901. 'skip_download': True,
  902. }
  903. },
  904. # MLB embed
  905. {
  906. 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
  907. 'md5': '96f09a37e44da40dd083e12d9a683327',
  908. 'info_dict': {
  909. 'id': '33322633',
  910. 'ext': 'mp4',
  911. 'title': 'Ump changes call to ball',
  912. 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
  913. 'duration': 48,
  914. 'timestamp': 1401537900,
  915. 'upload_date': '20140531',
  916. 'thumbnail': r're:^https?://.*\.jpg$',
  917. },
  918. },
  919. # Wistia embed
  920. {
  921. 'url': 'http://study.com/academy/lesson/north-american-exploration-failed-colonies-of-spain-france-england.html#lesson',
  922. 'md5': '1953f3a698ab51cfc948ed3992a0b7ff',
  923. 'info_dict': {
  924. 'id': '6e2wtrbdaf',
  925. 'ext': 'mov',
  926. 'title': 'paywall_north-american-exploration-failed-colonies-of-spain-france-england',
  927. 'description': 'a Paywall Videos video from Remilon',
  928. 'duration': 644.072,
  929. 'uploader': 'study.com',
  930. 'timestamp': 1459678540,
  931. 'upload_date': '20160403',
  932. 'filesize': 24687186,
  933. },
  934. },
  935. {
  936. 'url': 'http://thoughtworks.wistia.com/medias/uxjb0lwrcz',
  937. 'md5': 'baf49c2baa8a7de5f3fc145a8506dcd4',
  938. 'info_dict': {
  939. 'id': 'uxjb0lwrcz',
  940. 'ext': 'mp4',
  941. 'title': 'Conversation about Hexagonal Rails Part 1',
  942. 'description': 'a Martin Fowler video from ThoughtWorks',
  943. 'duration': 1715.0,
  944. 'uploader': 'thoughtworks.wistia.com',
  945. 'timestamp': 1401832161,
  946. 'upload_date': '20140603',
  947. },
  948. },
  949. # Wistia standard embed (async)
  950. {
  951. 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
  952. 'info_dict': {
  953. 'id': '807fafadvk',
  954. 'ext': 'mp4',
  955. 'title': 'Drip Brennan Dunn Workshop',
  956. 'description': 'a JV Webinars video from getdrip-1',
  957. 'duration': 4986.95,
  958. 'timestamp': 1463607249,
  959. 'upload_date': '20160518',
  960. },
  961. 'params': {
  962. 'skip_download': True,
  963. }
  964. },
  965. # Soundcloud embed
  966. {
  967. 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
  968. 'info_dict': {
  969. 'id': '174391317',
  970. 'ext': 'mp3',
  971. 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
  972. 'uploader': 'Sophos Security',
  973. 'title': 'Chet Chat 171 - Oct 29, 2014',
  974. 'upload_date': '20141029',
  975. }
  976. },
  977. # Soundcloud multiple embeds
  978. {
  979. 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
  980. 'info_dict': {
  981. 'id': '52809',
  982. 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
  983. },
  984. 'playlist_mincount': 7,
  985. },
  986. # TuneIn station embed
  987. {
  988. 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
  989. 'info_dict': {
  990. 'id': '204146',
  991. 'ext': 'mp3',
  992. 'title': 'CNRV',
  993. 'location': 'Paris, France',
  994. 'is_live': True,
  995. },
  996. 'params': {
  997. # Live stream
  998. 'skip_download': True,
  999. },
  1000. },
  1001. # Livestream embed
  1002. {
  1003. 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
  1004. 'info_dict': {
  1005. 'id': '67864563',
  1006. 'ext': 'flv',
  1007. 'upload_date': '20141112',
  1008. 'title': 'Rosetta #CometLanding webcast HL 10',
  1009. }
  1010. },
  1011. # Another Livestream embed, without 'new.' in URL
  1012. {
  1013. 'url': 'https://www.freespeech.org/',
  1014. 'info_dict': {
  1015. 'id': '123537347',
  1016. 'ext': 'mp4',
  1017. 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
  1018. },
  1019. 'params': {
  1020. # Live stream
  1021. 'skip_download': True,
  1022. },
  1023. },
  1024. # LazyYT
  1025. {
  1026. 'url': 'https://skiplagged.com/',
  1027. 'info_dict': {
  1028. 'id': 'skiplagged',
  1029. 'title': 'Skiplagged: The smart way to find cheap flights',
  1030. },
  1031. 'playlist_mincount': 1,
  1032. 'add_ie': ['Youtube'],
  1033. },
  1034. # Cinchcast embed
  1035. {
  1036. 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
  1037. 'info_dict': {
  1038. 'id': '7141703',
  1039. 'ext': 'mp3',
  1040. 'upload_date': '20141126',
  1041. 'title': 'Jack Tips: 5 Steps to Permanent Gut Healing',
  1042. }
  1043. },
  1044. # Cinerama player
  1045. {
  1046. 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
  1047. 'info_dict': {
  1048. 'id': '730m_DandD_1901_512k',
  1049. 'ext': 'mp4',
  1050. 'uploader': 'www.abc.net.au',
  1051. 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
  1052. }
  1053. },
  1054. # embedded viddler video
  1055. {
  1056. 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
  1057. 'info_dict': {
  1058. 'id': '4d03aad9',
  1059. 'ext': 'mp4',
  1060. 'uploader': 'deadspin',
  1061. 'title': 'WALL-TO-GORTAT',
  1062. 'timestamp': 1422285291,
  1063. 'upload_date': '20150126',
  1064. },
  1065. 'add_ie': ['Viddler'],
  1066. },
  1067. # Libsyn embed
  1068. {
  1069. 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
  1070. 'info_dict': {
  1071. 'id': '3377616',
  1072. 'ext': 'mp3',
  1073. 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
  1074. 'description': 'md5:601cb790edd05908957dae8aaa866465',
  1075. 'upload_date': '20150220',
  1076. },
  1077. 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
  1078. },
  1079. # jwplayer YouTube
  1080. {
  1081. 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
  1082. 'info_dict': {
  1083. 'id': 'Mrj4DVp2zeA',
  1084. 'ext': 'mp4',
  1085. 'upload_date': '20150212',
  1086. 'uploader': 'The National Archives UK',
  1087. 'description': 'md5:8078af856dca76edc42910b61273dbbf',
  1088. 'uploader_id': 'NationalArchives08',
  1089. 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
  1090. },
  1091. },
  1092. # jwplayer rtmp
  1093. {
  1094. 'url': 'http://www.suffolk.edu/sjc/live.php',
  1095. 'info_dict': {
  1096. 'id': 'live',
  1097. 'ext': 'flv',
  1098. 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
  1099. 'uploader': 'www.suffolk.edu',
  1100. },
  1101. 'params': {
  1102. 'skip_download': True,
  1103. },
  1104. 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
  1105. },
  1106. # Complex jwplayer
  1107. {
  1108. 'url': 'http://www.indiedb.com/games/king-machine/videos',
  1109. 'info_dict': {
  1110. 'id': 'videos',
  1111. 'ext': 'mp4',
  1112. 'title': 'king machine trailer 1',
  1113. 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
  1114. 'thumbnail': r're:^https?://.*\.jpg$',
  1115. },
  1116. },
  1117. {
  1118. # JWPlayer config passed as variable
  1119. 'url': 'http://www.txxx.com/videos/3326530/ariele/',
  1120. 'info_dict': {
  1121. 'id': '3326530_hq',
  1122. 'ext': 'mp4',
  1123. 'title': 'ARIELE | Tube Cup',
  1124. 'uploader': 'www.txxx.com',
  1125. 'age_limit': 18,
  1126. },
  1127. 'params': {
  1128. 'skip_download': True,
  1129. }
  1130. },
  1131. {
  1132. # JWPlatform iframe
  1133. 'url': 'https://www.mediaite.com/tv/dem-senator-claims-gary-cohn-faked-a-bad-connection-during-trump-call-to-get-him-off-the-phone/',
  1134. 'md5': 'ca00a040364b5b439230e7ebfd02c4e9',
  1135. 'info_dict': {
  1136. 'id': 'O0c5JcKT',
  1137. 'ext': 'mp4',
  1138. 'upload_date': '20171122',
  1139. 'timestamp': 1511366290,
  1140. 'title': 'Dem Senator Claims Gary Cohn Faked a Bad Connection During Trump Call to Get Him Off the Phone',
  1141. },
  1142. 'add_ie': [JWPlatformIE.ie_key()],
  1143. },
  1144. {
  1145. # Video.js embed, multiple formats
  1146. 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
  1147. 'info_dict': {
  1148. 'id': 'yygqldloqIk',
  1149. 'ext': 'mp4',
  1150. 'title': 'SolidWorks. Урок 6 Настройка чертежа',
  1151. 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
  1152. 'upload_date': '20130314',
  1153. 'uploader': 'PROстое3D',
  1154. 'uploader_id': 'PROstoe3D',
  1155. },
  1156. 'params': {
  1157. 'skip_download': True,
  1158. },
  1159. },
  1160. {
  1161. # Video.js embed, single format
  1162. 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
  1163. 'info_dict': {
  1164. 'id': 'watch',
  1165. 'ext': 'mp4',
  1166. 'title': 'Step 1 - Good Foundation',
  1167. 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
  1168. },
  1169. 'params': {
  1170. 'skip_download': True,
  1171. },
  1172. },
  1173. # rtl.nl embed
  1174. {
  1175. 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
  1176. 'playlist_mincount': 5,
  1177. 'info_dict': {
  1178. 'id': 'aanslagen-kopenhagen',
  1179. 'title': 'Aanslagen Kopenhagen',
  1180. }
  1181. },
  1182. # Zapiks embed
  1183. {
  1184. 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
  1185. 'info_dict': {
  1186. 'id': '118046',
  1187. 'ext': 'mp4',
  1188. 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
  1189. }
  1190. },
  1191. # Kaltura embed (different embed code)
  1192. {
  1193. 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
  1194. 'info_dict': {
  1195. 'id': '1_a52wc67y',
  1196. 'ext': 'flv',
  1197. 'upload_date': '20150127',
  1198. 'uploader_id': 'PremierMedia',
  1199. 'timestamp': int,
  1200. 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
  1201. },
  1202. },
  1203. # Kaltura embed with single quotes
  1204. {
  1205. 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
  1206. 'info_dict': {
  1207. 'id': '0_izeg5utt',
  1208. 'ext': 'mp4',
  1209. 'title': '35871',
  1210. 'timestamp': 1355743100,
  1211. 'upload_date': '20121217',
  1212. 'uploader_id': 'batchUser',
  1213. },
  1214. 'add_ie': ['Kaltura'],
  1215. },
  1216. {
  1217. # Kaltura embedded via quoted entry_id
  1218. 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
  1219. 'info_dict': {
  1220. 'id': '0_utuok90b',
  1221. 'ext': 'mp4',
  1222. 'title': '06_matthew_brender_raj_dutt',
  1223. 'timestamp': 1466638791,
  1224. 'upload_date': '20160622',
  1225. },
  1226. 'add_ie': ['Kaltura'],
  1227. 'expected_warnings': [
  1228. 'Could not send HEAD request'
  1229. ],
  1230. 'params': {
  1231. 'skip_download': True,
  1232. }
  1233. },
  1234. {
  1235. # Kaltura embedded, some fileExt broken (#11480)
  1236. 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
  1237. 'info_dict': {
  1238. 'id': '1_sgtvehim',
  1239. 'ext': 'mp4',
  1240. 'title': 'Our "Standard Models" of particle physics and cosmology',
  1241. 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
  1242. 'timestamp': 1321158993,
  1243. 'upload_date': '20111113',
  1244. 'uploader_id': 'kps1',
  1245. },
  1246. 'add_ie': ['Kaltura'],
  1247. },
  1248. {
  1249. # Kaltura iframe embed
  1250. 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
  1251. 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
  1252. 'info_dict': {
  1253. 'id': '0_f2cfbpwy',
  1254. 'ext': 'mp4',
  1255. 'title': 'I. M. Pei: A Centennial Celebration',
  1256. 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
  1257. 'upload_date': '20170403',
  1258. 'uploader_id': 'batchUser',
  1259. 'timestamp': 1491232186,
  1260. },
  1261. 'add_ie': ['Kaltura'],
  1262. },
  1263. # EaglePlatform embed (generic URL)
  1264. {
  1265. 'url': 'http://lenta.ru/news/2015/03/06/navalny/',
  1266. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1267. 'info_dict': {
  1268. 'id': '227304',
  1269. 'ext': 'mp4',
  1270. 'title': 'Навальный вышел на свободу',
  1271. 'description': 'md5:d97861ac9ae77377f3f20eaf9d04b4f5',
  1272. 'thumbnail': r're:^https?://.*\.jpg$',
  1273. 'duration': 87,
  1274. 'view_count': int,
  1275. 'age_limit': 0,
  1276. },
  1277. 'params': {
  1278. 'skip_download': True,
  1279. },
  1280. },
  1281. # referrer protected EaglePlatform embed
  1282. {
  1283. 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
  1284. 'info_dict': {
  1285. 'id': '582306',
  1286. 'ext': 'mp4',
  1287. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  1288. 'thumbnail': r're:^https?://.*\.jpg$',
  1289. 'duration': 3382,
  1290. 'view_count': int,
  1291. },
  1292. 'params': {
  1293. 'skip_download': True,
  1294. },
  1295. },
  1296. # ClipYou (EaglePlatform) embed (custom URL)
  1297. {
  1298. 'url': 'http://muz-tv.ru/play/7129/',
  1299. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1300. 'info_dict': {
  1301. 'id': '12820',
  1302. 'ext': 'mp4',
  1303. 'title': "'O Sole Mio",
  1304. 'thumbnail': r're:^https?://.*\.jpg$',
  1305. 'duration': 216,
  1306. 'view_count': int,
  1307. },
  1308. 'params': {
  1309. 'skip_download': True,
  1310. },
  1311. 'skip': 'This video is unavailable.',
  1312. },
  1313. # Pladform embed
  1314. {
  1315. 'url': 'http://muz-tv.ru/kinozal/view/7400/',
  1316. 'info_dict': {
  1317. 'id': '100183293',
  1318. 'ext': 'mp4',
  1319. 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
  1320. 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
  1321. 'thumbnail': r're:^https?://.*\.jpg$',
  1322. 'duration': 694,
  1323. 'age_limit': 0,
  1324. },
  1325. 'skip': 'HTTP Error 404: Not Found',
  1326. },
  1327. # Playwire embed
  1328. {
  1329. 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
  1330. 'info_dict': {
  1331. 'id': '3519514',
  1332. 'ext': 'mp4',
  1333. 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
  1334. 'thumbnail': r're:^https?://.*\.png$',
  1335. 'duration': 45.115,
  1336. },
  1337. },
  1338. # 5min embed
  1339. {
  1340. 'url': 'http://techcrunch.com/video/facebook-creates-on-this-day-crunch-report/518726732/',
  1341. 'md5': '4c6f127a30736b59b3e2c19234ee2bf7',
  1342. 'info_dict': {
  1343. 'id': '518726732',
  1344. 'ext': 'mp4',
  1345. 'title': 'Facebook Creates "On This Day" | Crunch Report',
  1346. 'description': 'Amazon updates Fire TV line, Tesla\'s Model X spotted in the wild',
  1347. 'timestamp': 1427237531,
  1348. 'uploader': 'Crunch Report',
  1349. 'upload_date': '20150324',
  1350. },
  1351. 'params': {
  1352. # m3u8 download
  1353. 'skip_download': True,
  1354. },
  1355. },
  1356. # SVT embed
  1357. {
  1358. 'url': 'http://www.svt.se/sport/ishockey/jagr-tacklar-giroux-under-intervjun',
  1359. 'info_dict': {
  1360. 'id': '2900353',
  1361. 'ext': 'flv',
  1362. 'title': 'Här trycker Jagr till Giroux (under SVT-intervjun)',
  1363. 'duration': 27,
  1364. 'age_limit': 0,
  1365. },
  1366. },
  1367. # Crooks and Liars embed
  1368. {
  1369. 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
  1370. 'info_dict': {
  1371. 'id': '8RUoRhRi',
  1372. 'ext': 'mp4',
  1373. 'title': "Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!",
  1374. 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
  1375. 'timestamp': 1428207000,
  1376. 'upload_date': '20150405',
  1377. 'uploader': 'Heather',
  1378. },
  1379. },
  1380. # Crooks and Liars external embed
  1381. {
  1382. 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
  1383. 'info_dict': {
  1384. 'id': 'MTE3MjUtMzQ2MzA',
  1385. 'ext': 'mp4',
  1386. 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
  1387. 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
  1388. 'timestamp': 1265032391,
  1389. 'upload_date': '20100201',
  1390. 'uploader': 'Heather',
  1391. },
  1392. },
  1393. # NBC Sports vplayer embed
  1394. {
  1395. 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
  1396. 'info_dict': {
  1397. 'id': 'ln7x1qSThw4k',
  1398. 'ext': 'flv',
  1399. 'title': "PFT Live: New leader in the 'new-look' defense",
  1400. 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
  1401. 'uploader': 'NBCU-SPORTS',
  1402. 'upload_date': '20140107',
  1403. 'timestamp': 1389118457,
  1404. },
  1405. 'skip': 'Invalid Page URL',
  1406. },
  1407. # NBC News embed
  1408. {
  1409. 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
  1410. 'md5': '1aa589c675898ae6d37a17913cf68d66',
  1411. 'info_dict': {
  1412. 'id': 'x_dtl_oa_LettermanliftPR_160608',
  1413. 'ext': 'mp4',
  1414. 'title': 'David Letterman: A Preview',
  1415. 'description': 'A preview of Tom Brokaw\'s interview with David Letterman as part of the On Assignment series powered by Dateline. Airs Sunday June 12 at 7/6c.',
  1416. 'upload_date': '20160609',
  1417. 'timestamp': 1465431544,
  1418. 'uploader': 'NBCU-NEWS',
  1419. },
  1420. },
  1421. # UDN embed
  1422. {
  1423. 'url': 'https://video.udn.com/news/300346',
  1424. 'md5': 'fd2060e988c326991037b9aff9df21a6',
  1425. 'info_dict': {
  1426. 'id': '300346',
  1427. 'ext': 'mp4',
  1428. 'title': '中一中男師變性 全校師生力挺',
  1429. 'thumbnail': r're:^https?://.*\.jpg$',
  1430. },
  1431. 'params': {
  1432. # m3u8 download
  1433. 'skip_download': True,
  1434. },
  1435. 'expected_warnings': ['Failed to parse JSON Expecting value'],
  1436. },
  1437. # Ooyala embed
  1438. {
  1439. 'url': 'http://www.businessinsider.com/excel-index-match-vlookup-video-how-to-2015-2?IR=T',
  1440. 'info_dict': {
  1441. 'id': '50YnY4czr4ms1vJ7yz3xzq0excz_pUMs',
  1442. 'ext': 'mp4',
  1443. 'description': 'Index/Match versus VLOOKUP.',
  1444. 'title': 'This is what separates the Excel masters from the wannabes',
  1445. 'duration': 191.933,
  1446. },
  1447. 'params': {
  1448. # m3u8 downloads
  1449. 'skip_download': True,
  1450. }
  1451. },
  1452. # Brightcove URL in single quotes
  1453. {
  1454. 'url': 'http://www.sportsnet.ca/baseball/mlb/sn-presents-russell-martin-world-citizen/',
  1455. 'md5': '4ae374f1f8b91c889c4b9203c8c752af',
  1456. 'info_dict': {
  1457. 'id': '4255764656001',
  1458. 'ext': 'mp4',
  1459. 'title': 'SN Presents: Russell Martin, World Citizen',
  1460. 'description': 'To understand why he was the Toronto Blue Jays’ top off-season priority is to appreciate his background and upbringing in Montreal, where he first developed his baseball skills. Written and narrated by Stephen Brunt.',
  1461. 'uploader': 'Rogers Sportsnet',
  1462. 'uploader_id': '1704050871',
  1463. 'upload_date': '20150525',
  1464. 'timestamp': 1432570283,
  1465. },
  1466. },
  1467. # OnionStudios embed
  1468. {
  1469. 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
  1470. 'info_dict': {
  1471. 'id': '2855',
  1472. 'ext': 'mp4',
  1473. 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
  1474. 'thumbnail': r're:^https?://.*\.jpe?g$',
  1475. 'uploader': 'ClickHole',
  1476. 'uploader_id': 'clickhole',
  1477. }
  1478. },
  1479. # SnagFilms embed
  1480. {
  1481. 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
  1482. 'info_dict': {
  1483. 'id': '74849a00-85a9-11e1-9660-123139220831',
  1484. 'ext': 'mp4',
  1485. 'title': '#whilewewatch',
  1486. }
  1487. },
  1488. # AdobeTVVideo embed
  1489. {
  1490. 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
  1491. 'md5': '43662b577c018ad707a63766462b1e87',
  1492. 'info_dict': {
  1493. 'id': '2456',
  1494. 'ext': 'mp4',
  1495. 'title': 'New experience with Acrobat DC',
  1496. 'description': 'New experience with Acrobat DC',
  1497. 'duration': 248.667,
  1498. },
  1499. },
  1500. # BrightcoveInPageEmbed embed
  1501. {
  1502. 'url': 'http://www.geekandsundry.com/tabletop-bonus-wils-final-thoughts-on-dread/',
  1503. 'info_dict': {
  1504. 'id': '4238694884001',
  1505. 'ext': 'flv',
  1506. 'title': 'Tabletop: Dread, Last Thoughts',
  1507. 'description': 'Tabletop: Dread, Last Thoughts',
  1508. 'duration': 51690,
  1509. },
  1510. },
  1511. # Brightcove embed, with no valid 'renditions' but valid 'IOSRenditions'
  1512. # This video can't be played in browsers if Flash disabled and UA set to iPhone, which is actually a false alarm
  1513. {
  1514. 'url': 'https://dl.dropboxusercontent.com/u/29092637/interview.html',
  1515. 'info_dict': {
  1516. 'id': '4785848093001',
  1517. 'ext': 'mp4',
  1518. 'title': 'The Cardinal Pell Interview',
  1519. 'description': 'Sky News Contributor Andrew Bolt interviews George Pell in Rome, following the Cardinal\'s evidence before the Royal Commission into Child Abuse. ',
  1520. 'uploader': 'GlobeCast Australia - GlobeStream',
  1521. 'uploader_id': '2733773828001',
  1522. 'upload_date': '20160304',
  1523. 'timestamp': 1457083087,
  1524. },
  1525. 'params': {
  1526. # m3u8 downloads
  1527. 'skip_download': True,
  1528. },
  1529. },
  1530. {
  1531. # Brightcove embed with whitespace around attribute names
  1532. 'url': 'http://www.stack.com/video/3167554373001/learn-to-hit-open-three-pointers-with-damian-lillard-s-baseline-drift-drill',
  1533. 'info_dict': {
  1534. 'id': '3167554373001',
  1535. 'ext': 'mp4',
  1536. 'title': "Learn to Hit Open Three-Pointers With Damian Lillard's Baseline Drift Drill",
  1537. 'description': 'md5:57bacb0e0f29349de4972bfda3191713',
  1538. 'uploader_id': '1079349493',
  1539. 'upload_date': '20140207',
  1540. 'timestamp': 1391810548,
  1541. },
  1542. 'params': {
  1543. 'skip_download': True,
  1544. },
  1545. },
  1546. # Another form of arte.tv embed
  1547. {
  1548. 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
  1549. 'md5': '850bfe45417ddf221288c88a0cffe2e2',
  1550. 'info_dict': {
  1551. 'id': '030273-562_PLUS7-F',
  1552. 'ext': 'mp4',
  1553. 'title': 'ARTE Reportage - Nulle part, en France',
  1554. 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
  1555. 'upload_date': '20160409',
  1556. },
  1557. },
  1558. # LiveLeak embed
  1559. {
  1560. 'url': 'http://www.wykop.pl/link/3088787/',
  1561. 'md5': '7619da8c820e835bef21a1efa2a0fc71',
  1562. 'info_dict': {
  1563. 'id': '874_1459135191',
  1564. 'ext': 'mp4',
  1565. 'title': 'Man shows poor quality of new apartment building',
  1566. 'description': 'The wall is like a sand pile.',
  1567. 'uploader': 'Lake8737',
  1568. },
  1569. 'add_ie': [LiveLeakIE.ie_key()],
  1570. },
  1571. # Another LiveLeak embed pattern (#13336)
  1572. {
  1573. 'url': 'https://milo.yiannopoulos.net/2017/06/concealed-carry-robbery/',
  1574. 'info_dict': {
  1575. 'id': '2eb_1496309988',
  1576. 'ext': 'mp4',
  1577. 'title': 'Thief robs place where everyone was armed',
  1578. 'description': 'md5:694d73ee79e535953cf2488562288eee',
  1579. 'uploader': 'brazilwtf',
  1580. },
  1581. 'add_ie': [LiveLeakIE.ie_key()],
  1582. },
  1583. # Duplicated embedded video URLs
  1584. {
  1585. 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
  1586. 'info_dict': {
  1587. 'id': '149298443_480_16c25b74_2',
  1588. 'ext': 'mp4',
  1589. 'title': 'vs. Blue Orange Spring Game',
  1590. 'uploader': 'www.hudl.com',
  1591. },
  1592. },
  1593. # twitter:player:stream embed
  1594. {
  1595. 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
  1596. 'info_dict': {
  1597. 'id': 'master',
  1598. 'ext': 'mp4',
  1599. 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
  1600. 'uploader': 'www.rtl.be',
  1601. },
  1602. 'params': {
  1603. # m3u8 downloads
  1604. 'skip_download': True,
  1605. },
  1606. },
  1607. # twitter:player embed
  1608. {
  1609. 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
  1610. 'md5': 'a3e0df96369831de324f0778e126653c',
  1611. 'info_dict': {
  1612. 'id': '4909620399001',
  1613. 'ext': 'mp4',
  1614. 'title': 'What Do Black Holes Sound Like?',
  1615. 'description': 'what do black holes sound like',
  1616. 'upload_date': '20160524',
  1617. 'uploader_id': '29913724001',
  1618. 'timestamp': 1464107587,
  1619. 'uploader': 'TheAtlantic',
  1620. },
  1621. 'add_ie': ['BrightcoveLegacy'],
  1622. },
  1623. # Facebook <iframe> embed
  1624. {
  1625. 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
  1626. 'md5': 'fbcde74f534176ecb015849146dd3aee',
  1627. 'info_dict': {
  1628. 'id': '599637780109885',
  1629. 'ext': 'mp4',
  1630. 'title': 'Facebook video #599637780109885',
  1631. },
  1632. },
  1633. # Facebook <iframe> embed, plugin video
  1634. {
  1635. 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
  1636. 'info_dict': {
  1637. 'id': '1754168231264132',
  1638. 'ext': 'mp4',
  1639. 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
  1640. 'uploader': 'Tariq Ramadan (official)',
  1641. 'timestamp': 1496758379,
  1642. 'upload_date': '20170606',
  1643. },
  1644. 'params': {
  1645. 'skip_download': True,
  1646. },
  1647. },
  1648. # Facebook API embed
  1649. {
  1650. 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
  1651. 'md5': 'a47372ee61b39a7b90287094d447d94e',
  1652. 'info_dict': {
  1653. 'id': '10153467542406923',
  1654. 'ext': 'mp4',
  1655. 'title': 'Facebook video #10153467542406923',
  1656. },
  1657. },
  1658. # Wordpress "YouTube Video Importer" plugin
  1659. {
  1660. 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
  1661. 'md5': 'd16797741b560b485194eddda8121b48',
  1662. 'info_dict': {
  1663. 'id': 'HNTXWDXV9Is',
  1664. 'ext': 'mp4',
  1665. 'title': 'Blue Devils Drumline Stanford lot 2016',
  1666. 'upload_date': '20160627',
  1667. 'uploader_id': 'GENOCIDE8GENERAL10',
  1668. 'uploader': 'cylus cyrus',
  1669. },
  1670. },
  1671. {
  1672. # video stored on custom kaltura server
  1673. 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
  1674. 'md5': '537617d06e64dfed891fa1593c4b30cc',
  1675. 'info_dict': {
  1676. 'id': '0_1iotm5bh',
  1677. 'ext': 'mp4',
  1678. 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
  1679. 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
  1680. 'uploader_id': 'videos.expansion@el-mundo.net',
  1681. 'upload_date': '20150429',
  1682. 'timestamp': 1430303472,
  1683. },
  1684. 'add_ie': ['Kaltura'],
  1685. },
  1686. {
  1687. # Non-standard Vimeo embed
  1688. 'url': 'https://openclassrooms.com/courses/understanding-the-web',
  1689. 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
  1690. 'info_dict': {
  1691. 'id': '148867247',
  1692. 'ext': 'mp4',
  1693. 'title': 'Understanding the web - Teaser',
  1694. 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
  1695. 'upload_date': '20151214',
  1696. 'uploader': 'OpenClassrooms',
  1697. 'uploader_id': 'openclassrooms',
  1698. },
  1699. 'add_ie': ['Vimeo'],
  1700. },
  1701. {
  1702. # generic vimeo embed that requires original URL passed as Referer
  1703. 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
  1704. 'only_matching': True,
  1705. },
  1706. {
  1707. 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
  1708. 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
  1709. 'info_dict': {
  1710. 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
  1711. 'ext': 'mp4',
  1712. 'title': 'Big Buck Bunny',
  1713. 'description': 'Royalty free test video',
  1714. 'timestamp': 1432816365,
  1715. 'upload_date': '20150528',
  1716. 'is_live': False,
  1717. },
  1718. 'params': {
  1719. 'skip_download': True,
  1720. },
  1721. 'add_ie': [ArkenaIE.ie_key()],
  1722. },
  1723. {
  1724. 'url': 'http://nova.bg/news/view/2016/08/16/156543/%D0%BD%D0%B0-%D0%BA%D0%BE%D1%81%D1%8A%D0%BC-%D0%BE%D1%82-%D0%B2%D0%B7%D1%80%D0%B8%D0%B2-%D0%BE%D1%82%D1%86%D0%B5%D0%BF%D0%B8%D1%85%D0%B0-%D1%86%D1%8F%D0%BB-%D0%BA%D0%B2%D0%B0%D1%80%D1%82%D0%B0%D0%BB-%D0%B7%D0%B0%D1%80%D0%B0%D0%B4%D0%B8-%D0%B8%D0%B7%D1%82%D0%B8%D1%87%D0%B0%D0%BD%D0%B5-%D0%BD%D0%B0-%D0%B3%D0%B0%D0%B7-%D0%B2-%D0%BF%D0%BB%D0%BE%D0%B2%D0%B4%D0%B8%D0%B2/',
  1725. 'info_dict': {
  1726. 'id': '1c7141f46c',
  1727. 'ext': 'mp4',
  1728. 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
  1729. },
  1730. 'params': {
  1731. 'skip_download': True,
  1732. },
  1733. 'add_ie': [Vbox7IE.ie_key()],
  1734. },
  1735. {
  1736. # DBTV embeds
  1737. 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
  1738. 'info_dict': {
  1739. 'id': '43254897',
  1740. 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
  1741. },
  1742. 'playlist_mincount': 3,
  1743. },
  1744. {
  1745. # Videa embeds
  1746. 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
  1747. 'info_dict': {
  1748. 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
  1749. 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
  1750. },
  1751. 'playlist_mincount': 2,
  1752. },
  1753. {
  1754. # 20 minuten embed
  1755. 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
  1756. 'info_dict': {
  1757. 'id': '523629',
  1758. 'ext': 'mp4',
  1759. 'title': 'So kommen Sie bei Eis und Schnee sicher an',
  1760. 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
  1761. },
  1762. 'params': {
  1763. 'skip_download': True,
  1764. },
  1765. 'add_ie': [TwentyMinutenIE.ie_key()],
  1766. },
  1767. {
  1768. # VideoPress embed
  1769. 'url': 'https://en.support.wordpress.com/videopress/',
  1770. 'info_dict': {
  1771. 'id': 'OcobLTqC',
  1772. 'ext': 'm4v',
  1773. 'title': 'IMG_5786',
  1774. 'timestamp': 1435711927,
  1775. 'upload_date': '20150701',
  1776. },
  1777. 'params': {
  1778. 'skip_download': True,
  1779. },
  1780. 'add_ie': [VideoPressIE.ie_key()],
  1781. },
  1782. {
  1783. # Rutube embed
  1784. 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
  1785. 'info_dict': {
  1786. 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
  1787. 'ext': 'flv',
  1788. 'title': 'Магаззино: Казань 2',
  1789. 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
  1790. 'uploader': 'Магаззино',
  1791. 'upload_date': '20170228',
  1792. 'uploader_id': '996642',
  1793. },
  1794. 'params': {
  1795. 'skip_download': True,
  1796. },
  1797. 'add_ie': [RutubeIE.ie_key()],
  1798. },
  1799. {
  1800. # ThePlatform embedded with whitespaces in URLs
  1801. 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
  1802. 'only_matching': True,
  1803. },
  1804. {
  1805. # Senate ISVP iframe https
  1806. 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
  1807. 'md5': 'fb8c70b0b515e5037981a2492099aab8',
  1808. 'info_dict': {
  1809. 'id': 'govtaff020316',
  1810. 'ext': 'mp4',
  1811. 'title': 'Integrated Senate Video Player',
  1812. },
  1813. 'add_ie': [SenateISVPIE.ie_key()],
  1814. },
  1815. {
  1816. # Limelight embeds (1 channel embed + 4 media embeds)
  1817. 'url': 'http://www.sedona.com/FacilitatorTraining2017',
  1818. 'info_dict': {
  1819. 'id': 'FacilitatorTraining2017',
  1820. 'title': 'Facilitator Training 2017',
  1821. },
  1822. 'playlist_mincount': 5,
  1823. },
  1824. {
  1825. # Limelight embed (LimelightPlayerUtil.embed)
  1826. 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
  1827. 'info_dict': {
  1828. 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
  1829. 'ext': 'mp4',
  1830. 'title': '07448641',
  1831. 'timestamp': 1499890639,
  1832. 'upload_date': '20170712',
  1833. },
  1834. 'params': {
  1835. 'skip_download': True,
  1836. },
  1837. 'add_ie': ['LimelightMedia'],
  1838. },
  1839. {
  1840. 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
  1841. 'info_dict': {
  1842. 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
  1843. 'title': 'Standoff with Walnut Creek murder suspect ends',
  1844. 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
  1845. },
  1846. 'playlist_mincount': 4,
  1847. },
  1848. {
  1849. # WashingtonPost embed
  1850. 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
  1851. 'info_dict': {
  1852. 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
  1853. 'ext': 'mp4',
  1854. 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
  1855. 'description': 'Donald Trump wanted a weekly TV drama based on his life. It never aired. But The Washington Post recently obtained a scene from the pilot script — and enlisted actors.',
  1856. 'timestamp': 1455216756,
  1857. 'uploader': 'The Washington Post',
  1858. 'upload_date': '20160211',
  1859. },
  1860. 'add_ie': [WashingtonPostIE.ie_key()],
  1861. },
  1862. {
  1863. # Mediaset embed
  1864. 'url': 'http://www.tgcom24.mediaset.it/politica/serracchiani-voglio-vivere-in-una-societa-aperta-reazioni-sproporzionate-_3071354-201702a.shtml',
  1865. 'info_dict': {
  1866. 'id': '720642',
  1867. 'ext': 'mp4',
  1868. 'title': 'Serracchiani: "Voglio vivere in una società aperta, con tutela del patto di fiducia"',
  1869. },
  1870. 'params': {
  1871. 'skip_download': True,
  1872. },
  1873. 'add_ie': [MediasetIE.ie_key()],
  1874. },
  1875. {
  1876. # JOJ.sk embeds
  1877. 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1878. 'info_dict': {
  1879. 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1880. 'title': 'Slovenskom sa prehnala vlna silných búrok',
  1881. },
  1882. 'playlist_mincount': 5,
  1883. 'add_ie': [JojIE.ie_key()],
  1884. },
  1885. {
  1886. # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
  1887. 'url': 'https://tvrain.ru/amp/418921/',
  1888. 'md5': 'cc00413936695987e8de148b67d14f1d',
  1889. 'info_dict': {
  1890. 'id': '418921',
  1891. 'ext': 'mp4',
  1892. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  1893. },
  1894. },
  1895. {
  1896. # vzaar embed
  1897. 'url': 'http://help.vzaar.com/article/165-embedding-video',
  1898. 'md5': '7e3919d9d2620b89e3e00bec7fe8c9d4',
  1899. 'info_dict': {
  1900. 'id': '8707641',
  1901. 'ext': 'mp4',
  1902. 'title': 'Building A Business Online: Principal Chairs Q & A',
  1903. },
  1904. },
  1905. {
  1906. # multiple HTML5 videos on one page
  1907. 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
  1908. 'info_dict': {
  1909. 'id': 'keyscenarios',
  1910. 'title': 'Rescue Kit 14 Free Edition - Getting started',
  1911. },
  1912. 'playlist_count': 4,
  1913. },
  1914. {
  1915. # vshare embed
  1916. 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
  1917. 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
  1918. 'info_dict': {
  1919. 'id': '0f64ce6',
  1920. 'title': 'vl14062007715967',
  1921. 'ext': 'mp4',
  1922. }
  1923. },
  1924. {
  1925. 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
  1926. 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
  1927. 'info_dict': {
  1928. 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
  1929. 'ext': 'mp4',
  1930. 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
  1931. 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
  1932. 'timestamp': 1474354800,
  1933. 'upload_date': '20160920',
  1934. }
  1935. }
  1936. # {
  1937. # # TODO: find another test
  1938. # # http://schema.org/VideoObject
  1939. # 'url': 'https://flipagram.com/f/nyvTSJMKId',
  1940. # 'md5': '888dcf08b7ea671381f00fab74692755',
  1941. # 'info_dict': {
  1942. # 'id': 'nyvTSJMKId',
  1943. # 'ext': 'mp4',
  1944. # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
  1945. # 'description': '#love for cats.',
  1946. # 'timestamp': 1461244995,
  1947. # 'upload_date': '20160421',
  1948. # },
  1949. # 'params': {
  1950. # 'force_generic_extractor': True,
  1951. # },
  1952. # }
  1953. ]
  1954. def report_following_redirect(self, new_url):
  1955. """Report information extraction."""
  1956. self._downloader.to_screen('[redirect] Following redirect to %s' % new_url)
  1957. def _extract_rss(self, url, video_id, doc):
  1958. playlist_title = doc.find('./channel/title').text
  1959. playlist_desc_el = doc.find('./channel/description')
  1960. playlist_desc = None if playlist_desc_el is None else playlist_desc_el.text
  1961. entries = []
  1962. for it in doc.findall('./channel/item'):
  1963. next_url = xpath_text(it, 'link', fatal=False)
  1964. if not next_url:
  1965. enclosure_nodes = it.findall('./enclosure')
  1966. for e in enclosure_nodes:
  1967. next_url = e.attrib.get('url')
  1968. if next_url:
  1969. break
  1970. if not next_url:
  1971. continue
  1972. entries.append({
  1973. '_type': 'url_transparent',
  1974. 'url': next_url,
  1975. 'title': it.find('title').text,
  1976. })
  1977. return {
  1978. '_type': 'playlist',
  1979. 'id': url,
  1980. 'title': playlist_title,
  1981. 'description': playlist_desc,
  1982. 'entries': entries,
  1983. }
  1984. def _extract_camtasia(self, url, video_id, webpage):
  1985. """ Returns None if no camtasia video can be found. """
  1986. camtasia_cfg = self._search_regex(
  1987. r'fo\.addVariable\(\s*"csConfigFile",\s*"([^"]+)"\s*\);',
  1988. webpage, 'camtasia configuration file', default=None)
  1989. if camtasia_cfg is None:
  1990. return None
  1991. title = self._html_search_meta('DC.title', webpage, fatal=True)
  1992. camtasia_url = compat_urlparse.urljoin(url, camtasia_cfg)
  1993. camtasia_cfg = self._download_xml(
  1994. camtasia_url, video_id,
  1995. note='Downloading camtasia configuration',
  1996. errnote='Failed to download camtasia configuration')
  1997. fileset_node = camtasia_cfg.find('./playlist/array/fileset')
  1998. entries = []
  1999. for n in fileset_node.getchildren():
  2000. url_n = n.find('./uri')
  2001. if url_n is None:
  2002. continue
  2003. entries.append({
  2004. 'id': os.path.splitext(url_n.text.rpartition('/')[2])[0],
  2005. 'title': '%s - %s' % (title, n.tag),
  2006. 'url': compat_urlparse.urljoin(url, url_n.text),
  2007. 'duration': float_or_none(n.find('./duration').text),
  2008. })
  2009. return {
  2010. '_type': 'playlist',
  2011. 'entries': entries,
  2012. 'title': title,
  2013. }
  2014. def _real_extract(self, url):
  2015. if url.startswith('//'):
  2016. return {
  2017. '_type': 'url',
  2018. 'url': self.http_scheme() + url,
  2019. }
  2020. parsed_url = compat_urlparse.urlparse(url)
  2021. if not parsed_url.scheme:
  2022. default_search = self._downloader.params.get('default_search')
  2023. if default_search is None:
  2024. default_search = 'fixup_error'
  2025. if default_search in ('auto', 'auto_warning', 'fixup_error'):
  2026. if '/' in url:
  2027. self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http')
  2028. return self.url_result('http://' + url)
  2029. elif default_search != 'fixup_error':
  2030. if default_search == 'auto_warning':
  2031. if re.match(r'^(?:url|URL)$', url):
  2032. raise ExtractorError(
  2033. 'Invalid URL: %r . Call youtube-dl like this: youtube-dl -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url,
  2034. expected=True)
  2035. else:
  2036. self._downloader.report_warning(
  2037. 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
  2038. return self.url_result('ytsearch:' + url)
  2039. if default_search in ('error', 'fixup_error'):
  2040. raise ExtractorError(
  2041. '%r is not a valid URL. '
  2042. 'Set --default-search "ytsearch" (or run youtube-dl "ytsearch:%s" ) to search YouTube'
  2043. % (url, url), expected=True)
  2044. else:
  2045. if ':' not in default_search:
  2046. default_search += ':'
  2047. return self.url_result(default_search + url)
  2048. url, smuggled_data = unsmuggle_url(url)
  2049. force_videoid = None
  2050. is_intentional = smuggled_data and smuggled_data.get('to_generic')
  2051. if smuggled_data and 'force_videoid' in smuggled_data:
  2052. force_videoid = smuggled_data['force_videoid']
  2053. video_id = force_videoid
  2054. else:
  2055. video_id = self._generic_id(url)
  2056. self.to_screen('%s: Requesting header' % video_id)
  2057. head_req = HEADRequest(url)
  2058. head_response = self._request_webpage(
  2059. head_req, video_id,
  2060. note=False, errnote='Could not send HEAD request to %s' % url,
  2061. fatal=False)
  2062. if head_response is not False:
  2063. # Check for redirect
  2064. new_url = compat_str(head_response.geturl())
  2065. if url != new_url:
  2066. self.report_following_redirect(new_url)
  2067. if force_videoid:
  2068. new_url = smuggle_url(
  2069. new_url, {'force_videoid': force_videoid})
  2070. return self.url_result(new_url)
  2071. full_response = None
  2072. if head_response is False:
  2073. request = sanitized_Request(url)
  2074. request.add_header('Accept-Encoding', '*')
  2075. full_response = self._request_webpage(request, video_id)
  2076. head_response = full_response
  2077. info_dict = {
  2078. 'id': video_id,
  2079. 'title': self._generic_title(url),
  2080. 'upload_date': unified_strdate(head_response.headers.get('Last-Modified'))
  2081. }
  2082. # Check for direct link to a video
  2083. content_type = head_response.headers.get('Content-Type', '').lower()
  2084. m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
  2085. if m:
  2086. format_id = compat_str(m.group('format_id'))
  2087. if format_id.endswith('mpegurl'):
  2088. formats = self._extract_m3u8_formats(url, video_id, 'mp4')
  2089. elif format_id == 'f4m':
  2090. formats = self._extract_f4m_formats(url, video_id)
  2091. else:
  2092. formats = [{
  2093. 'format_id': format_id,
  2094. 'url': url,
  2095. 'vcodec': 'none' if m.group('type') == 'audio' else None
  2096. }]
  2097. info_dict['direct'] = True
  2098. self._sort_formats(formats)
  2099. info_dict['formats'] = formats
  2100. return info_dict
  2101. if not self._downloader.params.get('test', False) and not is_intentional:
  2102. force = self._downloader.params.get('force_generic_extractor', False)
  2103. self._downloader.report_warning(
  2104. '%s on generic information extractor.' % ('Forcing' if force else 'Falling back'))
  2105. if not full_response:
  2106. request = sanitized_Request(url)
  2107. # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
  2108. # making it impossible to download only chunk of the file (yet we need only 512kB to
  2109. # test whether it's HTML or not). According to youtube-dl default Accept-Encoding
  2110. # that will always result in downloading the whole file that is not desirable.
  2111. # Therefore for extraction pass we have to override Accept-Encoding to any in order
  2112. # to accept raw bytes and being able to download only a chunk.
  2113. # It may probably better to solve this by checking Content-Type for application/octet-stream
  2114. # after HEAD request finishes, but not sure if we can rely on this.
  2115. request.add_header('Accept-Encoding', '*')
  2116. full_response = self._request_webpage(request, video_id)
  2117. first_bytes = full_response.read(512)
  2118. # Is it an M3U playlist?
  2119. if first_bytes.startswith(b'#EXTM3U'):
  2120. info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4')
  2121. self._sort_formats(info_dict['formats'])
  2122. return info_dict
  2123. # Maybe it's a direct link to a video?
  2124. # Be careful not to download the whole thing!
  2125. if not is_html(first_bytes):
  2126. self._downloader.report_warning(
  2127. 'URL could be a direct video link, returning it as such.')
  2128. info_dict.update({
  2129. 'direct': True,
  2130. 'url': url,
  2131. })
  2132. return info_dict
  2133. webpage = self._webpage_read_content(
  2134. full_response, url, video_id, prefix=first_bytes)
  2135. self.report_extraction(video_id)
  2136. # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
  2137. try:
  2138. doc = compat_etree_fromstring(webpage.encode('utf-8'))
  2139. if doc.tag == 'rss':
  2140. return self._extract_rss(url, video_id, doc)
  2141. elif doc.tag == 'SmoothStreamingMedia':
  2142. info_dict['formats'] = self._parse_ism_formats(doc, url)
  2143. self._sort_formats(info_dict['formats'])
  2144. return info_dict
  2145. elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
  2146. smil = self._parse_smil(doc, url, video_id)
  2147. self._sort_formats(smil['formats'])
  2148. return smil
  2149. elif doc.tag == '{http://xspf.org/ns/0/}playlist':
  2150. return self.playlist_result(self._parse_xspf(doc, video_id), video_id)
  2151. elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
  2152. info_dict['formats'] = self._parse_mpd_formats(
  2153. doc,
  2154. mpd_base_url=compat_str(full_response.geturl()).rpartition('/')[0],
  2155. mpd_url=url)
  2156. self._sort_formats(info_dict['formats'])
  2157. return info_dict
  2158. elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
  2159. info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
  2160. self._sort_formats(info_dict['formats'])
  2161. return info_dict
  2162. except compat_xml_parse_error:
  2163. pass
  2164. # Is it a Camtasia project?
  2165. camtasia_res = self._extract_camtasia(url, video_id, webpage)
  2166. if camtasia_res is not None:
  2167. return camtasia_res
  2168. # Sometimes embedded video player is hidden behind percent encoding
  2169. # (e.g. https://github.com/rg3/youtube-dl/issues/2448)
  2170. # Unescaping the whole page allows to handle those cases in a generic way
  2171. webpage = compat_urllib_parse_unquote(webpage)
  2172. # it's tempting to parse this further, but you would
  2173. # have to take into account all the variations like
  2174. # Video Title - Site Name
  2175. # Site Name | Video Title
  2176. # Video Title - Tagline | Site Name
  2177. # and so on and so forth; it's just not practical
  2178. video_title = self._og_search_title(
  2179. webpage, default=None) or self._html_search_regex(
  2180. r'(?s)<title>(.*?)</title>', webpage, 'video title',
  2181. default='video')
  2182. # Try to detect age limit automatically
  2183. age_limit = self._rta_search(webpage)
  2184. # And then there are the jokers who advertise that they use RTA,
  2185. # but actually don't.
  2186. AGE_LIMIT_MARKERS = [
  2187. r'Proudly Labeled <a href="http://www\.rtalabel\.org/" title="Restricted to Adults">RTA</a>',
  2188. ]
  2189. if any(re.search(marker, webpage) for marker in AGE_LIMIT_MARKERS):
  2190. age_limit = 18
  2191. # video uploader is domain name
  2192. video_uploader = self._search_regex(
  2193. r'^(?:https?://)?([^/]*)/.*', url, 'video uploader')
  2194. video_description = self._og_search_description(webpage, default=None)
  2195. video_thumbnail = self._og_search_thumbnail(webpage, default=None)
  2196. info_dict.update({
  2197. 'title': video_title,
  2198. 'description': video_description,
  2199. 'thumbnail': video_thumbnail,
  2200. 'age_limit': age_limit,
  2201. })
  2202. # Look for Brightcove Legacy Studio embeds
  2203. bc_urls = BrightcoveLegacyIE._extract_brightcove_urls(webpage)
  2204. if bc_urls:
  2205. entries = [{
  2206. '_type': 'url',
  2207. 'url': smuggle_url(bc_url, {'Referer': url}),
  2208. 'ie_key': 'BrightcoveLegacy'
  2209. } for bc_url in bc_urls]
  2210. return {
  2211. '_type': 'playlist',
  2212. 'title': video_title,
  2213. 'id': video_id,
  2214. 'entries': entries,
  2215. }
  2216. # Look for Brightcove New Studio embeds
  2217. bc_urls = BrightcoveNewIE._extract_urls(self, webpage)
  2218. if bc_urls:
  2219. return self.playlist_from_matches(bc_urls, video_id, video_title, ie='BrightcoveNew')
  2220. # Look for Nexx embeds
  2221. nexx_urls = NexxIE._extract_urls(webpage)
  2222. if nexx_urls:
  2223. return self.playlist_from_matches(nexx_urls, video_id, video_title, ie=NexxIE.ie_key())
  2224. # Look for Nexx iFrame embeds
  2225. nexx_embed_urls = NexxEmbedIE._extract_urls(webpage)
  2226. if nexx_embed_urls:
  2227. return self.playlist_from_matches(nexx_embed_urls, video_id, video_title, ie=NexxEmbedIE.ie_key())
  2228. # Look for ThePlatform embeds
  2229. tp_urls = ThePlatformIE._extract_urls(webpage)
  2230. if tp_urls:
  2231. return self.playlist_from_matches(tp_urls, video_id, video_title, ie='ThePlatform')
  2232. # Look for Vessel embeds
  2233. vessel_urls = VesselIE._extract_urls(webpage)
  2234. if vessel_urls:
  2235. return self.playlist_from_matches(vessel_urls, video_id, video_title, ie=VesselIE.ie_key())
  2236. # Look for embedded rtl.nl player
  2237. matches = re.findall(
  2238. r'<iframe[^>]+?src="((?:https?:)?//(?:(?:www|static)\.)?rtl\.nl/(?:system/videoplayer/[^"]+(?:video_)?)?embed[^"]+)"',
  2239. webpage)
  2240. if matches:
  2241. return self.playlist_from_matches(matches, video_id, video_title, ie='RtlNl')
  2242. vimeo_urls = VimeoIE._extract_urls(url, webpage)
  2243. if vimeo_urls:
  2244. return self.playlist_from_matches(vimeo_urls, video_id, video_title, ie=VimeoIE.ie_key())
  2245. vid_me_embed_url = self._search_regex(
  2246. r'src=[\'"](https?://vid\.me/[^\'"]+)[\'"]',
  2247. webpage, 'vid.me embed', default=None)
  2248. if vid_me_embed_url is not None:
  2249. return self.url_result(vid_me_embed_url, 'Vidme')
  2250. # Look for YouTube embeds
  2251. youtube_urls = YoutubeIE._extract_urls(webpage)
  2252. if youtube_urls:
  2253. return self.playlist_from_matches(
  2254. youtube_urls, video_id, video_title, ie=YoutubeIE.ie_key())
  2255. matches = DailymotionIE._extract_urls(webpage)
  2256. if matches:
  2257. return self.playlist_from_matches(matches, video_id, video_title)
  2258. # Look for embedded Dailymotion playlist player (#3822)
  2259. m = re.search(
  2260. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.[a-z]{2,3}/widget/jukebox\?.+?)\1', webpage)
  2261. if m:
  2262. playlists = re.findall(
  2263. r'list\[\]=/playlist/([^/]+)/', unescapeHTML(m.group('url')))
  2264. if playlists:
  2265. return self.playlist_from_matches(
  2266. playlists, video_id, video_title, lambda p: '//dailymotion.com/playlist/%s' % p)
  2267. # Look for DailyMail embeds
  2268. dailymail_urls = DailyMailIE._extract_urls(webpage)
  2269. if dailymail_urls:
  2270. return self.playlist_from_matches(
  2271. dailymail_urls, video_id, video_title, ie=DailyMailIE.ie_key())
  2272. # Look for embedded Wistia player
  2273. wistia_url = WistiaIE._extract_url(webpage)
  2274. if wistia_url:
  2275. return {
  2276. '_type': 'url_transparent',
  2277. 'url': self._proto_relative_url(wistia_url),
  2278. 'ie_key': WistiaIE.ie_key(),
  2279. 'uploader': video_uploader,
  2280. }
  2281. # Look for SVT player
  2282. svt_url = SVTIE._extract_url(webpage)
  2283. if svt_url:
  2284. return self.url_result(svt_url, 'SVT')
  2285. # Look for Bandcamp pages with custom domain
  2286. mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage)
  2287. if mobj is not None:
  2288. burl = unescapeHTML(mobj.group(1))
  2289. # Don't set the extractor because it can be a track url or an album
  2290. return self.url_result(burl)
  2291. # Look for embedded Vevo player
  2292. mobj = re.search(
  2293. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:cache\.)?vevo\.com/.+?)\1', webpage)
  2294. if mobj is not None:
  2295. return self.url_result(mobj.group('url'))
  2296. # Look for embedded Viddler player
  2297. mobj = re.search(
  2298. r'<(?:iframe[^>]+?src|param[^>]+?value)=(["\'])(?P<url>(?:https?:)?//(?:www\.)?viddler\.com/(?:embed|player)/.+?)\1',
  2299. webpage)
  2300. if mobj is not None:
  2301. return self.url_result(mobj.group('url'))
  2302. # Look for NYTimes player
  2303. mobj = re.search(
  2304. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//graphics8\.nytimes\.com/bcvideo/[^/]+/iframe/embed\.html.+?)\1>',
  2305. webpage)
  2306. if mobj is not None:
  2307. return self.url_result(mobj.group('url'))
  2308. # Look for Libsyn player
  2309. mobj = re.search(
  2310. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//html5-player\.libsyn\.com/embed/.+?)\1', webpage)
  2311. if mobj is not None:
  2312. return self.url_result(mobj.group('url'))
  2313. # Look for Ooyala videos
  2314. mobj = (re.search(r'player\.ooyala\.com/[^"?]+[?#][^"]*?(?:embedCode|ec)=(?P<ec>[^"&]+)', webpage) or
  2315. re.search(r'OO\.Player\.create\([\'"].*?[\'"],\s*[\'"](?P<ec>.{32})[\'"]', webpage) or
  2316. re.search(r'OO\.Player\.create\.apply\(\s*OO\.Player\s*,\s*op\(\s*\[\s*[\'"][^\'"]*[\'"]\s*,\s*[\'"](?P<ec>.{32})[\'"]', webpage) or
  2317. re.search(r'SBN\.VideoLinkset\.ooyala\([\'"](?P<ec>.{32})[\'"]\)', webpage) or
  2318. re.search(r'data-ooyala-video-id\s*=\s*[\'"](?P<ec>.{32})[\'"]', webpage))
  2319. if mobj is not None:
  2320. embed_token = self._search_regex(
  2321. r'embedToken[\'"]?\s*:\s*[\'"]([^\'"]+)',
  2322. webpage, 'ooyala embed token', default=None)
  2323. return OoyalaIE._build_url_result(smuggle_url(
  2324. mobj.group('ec'), {
  2325. 'domain': url,
  2326. 'embed_token': embed_token,
  2327. }))
  2328. # Look for multiple Ooyala embeds on SBN network websites
  2329. mobj = re.search(r'SBN\.VideoLinkset\.entryGroup\((\[.*?\])', webpage)
  2330. if mobj is not None:
  2331. embeds = self._parse_json(mobj.group(1), video_id, fatal=False)
  2332. if embeds:
  2333. return self.playlist_from_matches(
  2334. embeds, video_id, video_title,
  2335. getter=lambda v: OoyalaIE._url_for_embed_code(smuggle_url(v['provider_video_id'], {'domain': url})), ie='Ooyala')
  2336. # Look for Aparat videos
  2337. mobj = re.search(r'<iframe .*?src="(http://www\.aparat\.com/video/[^"]+)"', webpage)
  2338. if mobj is not None:
  2339. return self.url_result(mobj.group(1), 'Aparat')
  2340. # Look for MPORA videos
  2341. mobj = re.search(r'<iframe .*?src="(http://mpora\.(?:com|de)/videos/[^"]+)"', webpage)
  2342. if mobj is not None:
  2343. return self.url_result(mobj.group(1), 'Mpora')
  2344. # Look for embedded NovaMov-based player
  2345. mobj = re.search(
  2346. r'''(?x)<(?:pagespeed_)?iframe[^>]+?src=(["\'])
  2347. (?P<url>http://(?:(?:embed|www)\.)?
  2348. (?:novamov\.com|
  2349. nowvideo\.(?:ch|sx|eu|at|ag|co)|
  2350. videoweed\.(?:es|com)|
  2351. movshare\.(?:net|sx|ag)|
  2352. divxstage\.(?:eu|net|ch|co|at|ag))
  2353. /embed\.php.+?)\1''', webpage)
  2354. if mobj is not None:
  2355. return self.url_result(mobj.group('url'))
  2356. # Look for embedded Facebook player
  2357. facebook_urls = FacebookIE._extract_urls(webpage)
  2358. if facebook_urls:
  2359. return self.playlist_from_matches(facebook_urls, video_id, video_title)
  2360. # Look for embedded VK player
  2361. mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk\.com/video_ext\.php.+?)\1', webpage)
  2362. if mobj is not None:
  2363. return self.url_result(mobj.group('url'), 'VK')
  2364. # Look for embedded Odnoklassniki player
  2365. mobj = re.search(r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:odnoklassniki|ok)\.ru/videoembed/.+?)\1', webpage)
  2366. if mobj is not None:
  2367. return self.url_result(mobj.group('url'), 'Odnoklassniki')
  2368. # Look for embedded ivi player
  2369. mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
  2370. if mobj is not None:
  2371. return self.url_result(mobj.group('url'), 'Ivi')
  2372. # Look for embedded Huffington Post player
  2373. mobj = re.search(
  2374. r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)
  2375. if mobj is not None:
  2376. return self.url_result(mobj.group('url'), 'HuffPost')
  2377. # Look for embed.ly
  2378. mobj = re.search(r'class=["\']embedly-card["\'][^>]href=["\'](?P<url>[^"\']+)', webpage)
  2379. if mobj is not None:
  2380. return self.url_result(mobj.group('url'))
  2381. mobj = re.search(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', webpage)
  2382. if mobj is not None:
  2383. return self.url_result(compat_urllib_parse_unquote(mobj.group('url')))
  2384. # Look for funnyordie embed
  2385. matches = re.findall(r'<iframe[^>]+?src="(https?://(?:www\.)?funnyordie\.com/embed/[^"]+)"', webpage)
  2386. if matches:
  2387. return self.playlist_from_matches(
  2388. matches, video_id, video_title, getter=unescapeHTML, ie='FunnyOrDie')
  2389. # Look for BBC iPlayer embed
  2390. matches = re.findall(r'setPlaylist\("(https?://www\.bbc\.co\.uk/iplayer/[^/]+/[\da-z]{8})"\)', webpage)
  2391. if matches:
  2392. return self.playlist_from_matches(matches, video_id, video_title, ie='BBCCoUk')
  2393. # Look for embedded RUTV player
  2394. rutv_url = RUTVIE._extract_url(webpage)
  2395. if rutv_url:
  2396. return self.url_result(rutv_url, 'RUTV')
  2397. # Look for embedded TVC player
  2398. tvc_url = TVCIE._extract_url(webpage)
  2399. if tvc_url:
  2400. return self.url_result(tvc_url, 'TVC')
  2401. # Look for embedded SportBox player
  2402. sportbox_urls = SportBoxEmbedIE._extract_urls(webpage)
  2403. if sportbox_urls:
  2404. return self.playlist_from_matches(sportbox_urls, video_id, video_title, ie='SportBoxEmbed')
  2405. # Look for embedded XHamster player
  2406. xhamster_urls = XHamsterEmbedIE._extract_urls(webpage)
  2407. if xhamster_urls:
  2408. return self.playlist_from_matches(xhamster_urls, video_id, video_title, ie='XHamsterEmbed')
  2409. # Look for embedded TNAFlixNetwork player
  2410. tnaflix_urls = TNAFlixNetworkEmbedIE._extract_urls(webpage)
  2411. if tnaflix_urls:
  2412. return self.playlist_from_matches(tnaflix_urls, video_id, video_title, ie=TNAFlixNetworkEmbedIE.ie_key())
  2413. # Look for embedded PornHub player
  2414. pornhub_urls = PornHubIE._extract_urls(webpage)
  2415. if pornhub_urls:
  2416. return self.playlist_from_matches(pornhub_urls, video_id, video_title, ie=PornHubIE.ie_key())
  2417. # Look for embedded DrTuber player
  2418. drtuber_urls = DrTuberIE._extract_urls(webpage)
  2419. if drtuber_urls:
  2420. return self.playlist_from_matches(drtuber_urls, video_id, video_title, ie=DrTuberIE.ie_key())
  2421. # Look for embedded RedTube player
  2422. redtube_urls = RedTubeIE._extract_urls(webpage)
  2423. if redtube_urls:
  2424. return self.playlist_from_matches(redtube_urls, video_id, video_title, ie=RedTubeIE.ie_key())
  2425. # Look for embedded Tvigle player
  2426. mobj = re.search(
  2427. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//cloud\.tvigle\.ru/video/.+?)\1', webpage)
  2428. if mobj is not None:
  2429. return self.url_result(mobj.group('url'), 'Tvigle')
  2430. # Look for embedded TED player
  2431. mobj = re.search(
  2432. r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed(?:-ssl)?\.ted\.com/.+?)\1', webpage)
  2433. if mobj is not None:
  2434. return self.url_result(mobj.group('url'), 'TED')
  2435. # Look for embedded Ustream videos
  2436. ustream_url = UstreamIE._extract_url(webpage)
  2437. if ustream_url:
  2438. return self.url_result(ustream_url, UstreamIE.ie_key())
  2439. # Look for embedded arte.tv player
  2440. mobj = re.search(
  2441. r'<(?:script|iframe) [^>]*?src="(?P<url>http://www\.arte\.tv/(?:playerv2/embed|arte_vp/index)[^"]+)"',
  2442. webpage)
  2443. if mobj is not None:
  2444. return self.url_result(mobj.group('url'), 'ArteTVEmbed')
  2445. # Look for embedded francetv player
  2446. mobj = re.search(
  2447. r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?://)?embed\.francetv\.fr/\?ue=.+?)\1',
  2448. webpage)
  2449. if mobj is not None:
  2450. return self.url_result(mobj.group('url'))
  2451. # Look for embedded smotri.com player
  2452. smotri_url = SmotriIE._extract_url(webpage)
  2453. if smotri_url:
  2454. return self.url_result(smotri_url, 'Smotri')
  2455. # Look for embedded Myvi.ru player
  2456. myvi_url = MyviIE._extract_url(webpage)
  2457. if myvi_url:
  2458. return self.url_result(myvi_url)
  2459. # Look for embedded soundcloud player
  2460. soundcloud_urls = SoundcloudIE._extract_urls(webpage)
  2461. if soundcloud_urls:
  2462. return self.playlist_from_matches(soundcloud_urls, video_id, video_title, getter=unescapeHTML, ie=SoundcloudIE.ie_key())
  2463. # Look for tunein player
  2464. tunein_urls = TuneInBaseIE._extract_urls(webpage)
  2465. if tunein_urls:
  2466. return self.playlist_from_matches(tunein_urls, video_id, video_title)
  2467. # Look for embedded mtvservices player
  2468. mtvservices_url = MTVServicesEmbeddedIE._extract_url(webpage)
  2469. if mtvservices_url:
  2470. return self.url_result(mtvservices_url, ie='MTVServicesEmbedded')
  2471. # Look for embedded yahoo player
  2472. mobj = re.search(
  2473. r'<iframe[^>]+?src=(["\'])(?P<url>https?://(?:screen|movies)\.yahoo\.com/.+?\.html\?format=embed)\1',
  2474. webpage)
  2475. if mobj is not None:
  2476. return self.url_result(mobj.group('url'), 'Yahoo')
  2477. # Look for embedded sbs.com.au player
  2478. mobj = re.search(
  2479. r'''(?x)
  2480. (?:
  2481. <meta\s+property="og:video"\s+content=|
  2482. <iframe[^>]+?src=
  2483. )
  2484. (["\'])(?P<url>https?://(?:www\.)?sbs\.com\.au/ondemand/video/.+?)\1''',
  2485. webpage)
  2486. if mobj is not None:
  2487. return self.url_result(mobj.group('url'), 'SBS')
  2488. # Look for embedded Cinchcast player
  2489. mobj = re.search(
  2490. r'<iframe[^>]+?src=(["\'])(?P<url>https?://player\.cinchcast\.com/.+?)\1',
  2491. webpage)
  2492. if mobj is not None:
  2493. return self.url_result(mobj.group('url'), 'Cinchcast')
  2494. mobj = re.search(
  2495. r'<iframe[^>]+?src=(["\'])(?P<url>https?://m(?:lb)?\.mlb\.com/shared/video/embed/embed\.html\?.+?)\1',
  2496. webpage)
  2497. if not mobj:
  2498. mobj = re.search(
  2499. r'data-video-link=["\'](?P<url>http://m.mlb.com/video/[^"\']+)',
  2500. webpage)
  2501. if mobj is not None:
  2502. return self.url_result(mobj.group('url'), 'MLB')
  2503. mobj = re.search(
  2504. r'<(?:iframe|script)[^>]+?src=(["\'])(?P<url>%s)\1' % CondeNastIE.EMBED_URL,
  2505. webpage)
  2506. if mobj is not None:
  2507. return self.url_result(self._proto_relative_url(mobj.group('url'), scheme='http:'), 'CondeNast')
  2508. mobj = re.search(
  2509. r'<iframe[^>]+src="(?P<url>https?://(?:new\.)?livestream\.com/[^"]+/player[^"]+)"',
  2510. webpage)
  2511. if mobj is not None:
  2512. return self.url_result(mobj.group('url'), 'Livestream')
  2513. # Look for Zapiks embed
  2514. mobj = re.search(
  2515. r'<iframe[^>]+src="(?P<url>https?://(?:www\.)?zapiks\.fr/index\.php\?.+?)"', webpage)
  2516. if mobj is not None:
  2517. return self.url_result(mobj.group('url'), 'Zapiks')
  2518. # Look for Kaltura embeds
  2519. kaltura_url = KalturaIE._extract_url(webpage)
  2520. if kaltura_url:
  2521. return self.url_result(smuggle_url(kaltura_url, {'source_url': url}), KalturaIE.ie_key())
  2522. # Look for EaglePlatform embeds
  2523. eagleplatform_url = EaglePlatformIE._extract_url(webpage)
  2524. if eagleplatform_url:
  2525. return self.url_result(smuggle_url(eagleplatform_url, {'referrer': url}), EaglePlatformIE.ie_key())
  2526. # Look for ClipYou (uses EaglePlatform) embeds
  2527. mobj = re.search(
  2528. r'<iframe[^>]+src="https?://(?P<host>media\.clipyou\.ru)/index/player\?.*\brecord_id=(?P<id>\d+).*"', webpage)
  2529. if mobj is not None:
  2530. return self.url_result('eagleplatform:%(host)s:%(id)s' % mobj.groupdict(), 'EaglePlatform')
  2531. # Look for Pladform embeds
  2532. pladform_url = PladformIE._extract_url(webpage)
  2533. if pladform_url:
  2534. return self.url_result(pladform_url)
  2535. # Look for Videomore embeds
  2536. videomore_url = VideomoreIE._extract_url(webpage)
  2537. if videomore_url:
  2538. return self.url_result(videomore_url)
  2539. # Look for Webcaster embeds
  2540. webcaster_url = WebcasterFeedIE._extract_url(self, webpage)
  2541. if webcaster_url:
  2542. return self.url_result(webcaster_url, ie=WebcasterFeedIE.ie_key())
  2543. # Look for Playwire embeds
  2544. mobj = re.search(
  2545. r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
  2546. if mobj is not None:
  2547. return self.url_result(mobj.group('url'))
  2548. # Look for 5min embeds
  2549. mobj = re.search(
  2550. r'<meta[^>]+property="og:video"[^>]+content="https?://embed\.5min\.com/(?P<id>[0-9]+)/?', webpage)
  2551. if mobj is not None:
  2552. return self.url_result('5min:%s' % mobj.group('id'), 'FiveMin')
  2553. # Look for Crooks and Liars embeds
  2554. mobj = re.search(
  2555. r'<(?:iframe[^>]+src|param[^>]+value)=(["\'])(?P<url>(?:https?:)?//embed\.crooksandliars\.com/(?:embed|v)/.+?)\1', webpage)
  2556. if mobj is not None:
  2557. return self.url_result(mobj.group('url'))
  2558. # Look for NBC Sports VPlayer embeds
  2559. nbc_sports_url = NBCSportsVPlayerIE._extract_url(webpage)
  2560. if nbc_sports_url:
  2561. return self.url_result(nbc_sports_url, 'NBCSportsVPlayer')
  2562. # Look for NBC News embeds
  2563. nbc_news_embed_url = re.search(
  2564. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//www\.nbcnews\.com/widget/video-embed/[^"\']+)\1', webpage)
  2565. if nbc_news_embed_url:
  2566. return self.url_result(nbc_news_embed_url.group('url'), 'NBCNews')
  2567. # Look for Google Drive embeds
  2568. google_drive_url = GoogleDriveIE._extract_url(webpage)
  2569. if google_drive_url:
  2570. return self.url_result(google_drive_url, 'GoogleDrive')
  2571. # Look for UDN embeds
  2572. mobj = re.search(
  2573. r'<iframe[^>]+src="(?:https?:)?(?P<url>%s)"' % UDNEmbedIE._PROTOCOL_RELATIVE_VALID_URL, webpage)
  2574. if mobj is not None:
  2575. return self.url_result(
  2576. compat_urlparse.urljoin(url, mobj.group('url')), 'UDNEmbed')
  2577. # Look for Senate ISVP iframe
  2578. senate_isvp_url = SenateISVPIE._search_iframe_url(webpage)
  2579. if senate_isvp_url:
  2580. return self.url_result(senate_isvp_url, 'SenateISVP')
  2581. # Look for OnionStudios embeds
  2582. onionstudios_url = OnionStudiosIE._extract_url(webpage)
  2583. if onionstudios_url:
  2584. return self.url_result(onionstudios_url)
  2585. # Look for ViewLift embeds
  2586. viewlift_url = ViewLiftEmbedIE._extract_url(webpage)
  2587. if viewlift_url:
  2588. return self.url_result(viewlift_url)
  2589. # Look for JWPlatform embeds
  2590. jwplatform_urls = JWPlatformIE._extract_urls(webpage)
  2591. if jwplatform_urls:
  2592. return self.playlist_from_matches(jwplatform_urls, video_id, video_title, ie=JWPlatformIE.ie_key())
  2593. # Look for Digiteka embeds
  2594. digiteka_url = DigitekaIE._extract_url(webpage)
  2595. if digiteka_url:
  2596. return self.url_result(self._proto_relative_url(digiteka_url), DigitekaIE.ie_key())
  2597. # Look for Arkena embeds
  2598. arkena_url = ArkenaIE._extract_url(webpage)
  2599. if arkena_url:
  2600. return self.url_result(arkena_url, ArkenaIE.ie_key())
  2601. # Look for Piksel embeds
  2602. piksel_url = PikselIE._extract_url(webpage)
  2603. if piksel_url:
  2604. return self.url_result(piksel_url, PikselIE.ie_key())
  2605. # Look for Limelight embeds
  2606. limelight_urls = LimelightBaseIE._extract_urls(webpage, url)
  2607. if limelight_urls:
  2608. return self.playlist_result(
  2609. limelight_urls, video_id, video_title, video_description)
  2610. # Look for Anvato embeds
  2611. anvato_urls = AnvatoIE._extract_urls(self, webpage, video_id)
  2612. if anvato_urls:
  2613. return self.playlist_result(
  2614. anvato_urls, video_id, video_title, video_description)
  2615. # Look for AdobeTVVideo embeds
  2616. mobj = re.search(
  2617. r'<iframe[^>]+src=[\'"]((?:https?:)?//video\.tv\.adobe\.com/v/\d+[^"]+)[\'"]',
  2618. webpage)
  2619. if mobj is not None:
  2620. return self.url_result(
  2621. self._proto_relative_url(unescapeHTML(mobj.group(1))),
  2622. 'AdobeTVVideo')
  2623. # Look for Vine embeds
  2624. mobj = re.search(
  2625. r'<iframe[^>]+src=[\'"]((?:https?:)?//(?:www\.)?vine\.co/v/[^/]+/embed/(?:simple|postcard))',
  2626. webpage)
  2627. if mobj is not None:
  2628. return self.url_result(
  2629. self._proto_relative_url(unescapeHTML(mobj.group(1))), 'Vine')
  2630. # Look for VODPlatform embeds
  2631. mobj = re.search(
  2632. r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vod-platform\.net/[eE]mbed/.+?)\1',
  2633. webpage)
  2634. if mobj is not None:
  2635. return self.url_result(
  2636. self._proto_relative_url(unescapeHTML(mobj.group('url'))), 'VODPlatform')
  2637. # Look for Mangomolo embeds
  2638. mobj = re.search(
  2639. r'''(?x)<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?admin\.mangomolo\.com/analytics/index\.php/customers/embed/
  2640. (?:
  2641. video\?.*?\bid=(?P<video_id>\d+)|
  2642. index\?.*?\bchannelid=(?P<channel_id>(?:[A-Za-z0-9+/=]|%2B|%2F|%3D)+)
  2643. ).+?)\1''', webpage)
  2644. if mobj is not None:
  2645. info = {
  2646. '_type': 'url_transparent',
  2647. 'url': self._proto_relative_url(unescapeHTML(mobj.group('url'))),
  2648. 'title': video_title,
  2649. 'description': video_description,
  2650. 'thumbnail': video_thumbnail,
  2651. 'uploader': video_uploader,
  2652. }
  2653. video_id = mobj.group('video_id')
  2654. if video_id:
  2655. info.update({
  2656. 'ie_key': 'MangomoloVideo',
  2657. 'id': video_id,
  2658. })
  2659. else:
  2660. info.update({
  2661. 'ie_key': 'MangomoloLive',
  2662. 'id': mobj.group('channel_id'),
  2663. })
  2664. return info
  2665. # Look for Instagram embeds
  2666. instagram_embed_url = InstagramIE._extract_embed_url(webpage)
  2667. if instagram_embed_url is not None:
  2668. return self.url_result(
  2669. self._proto_relative_url(instagram_embed_url), InstagramIE.ie_key())
  2670. # Look for LiveLeak embeds
  2671. liveleak_urls = LiveLeakIE._extract_urls(webpage)
  2672. if liveleak_urls:
  2673. return self.playlist_from_matches(liveleak_urls, video_id, video_title)
  2674. # Look for 3Q SDN embeds
  2675. threeqsdn_url = ThreeQSDNIE._extract_url(webpage)
  2676. if threeqsdn_url:
  2677. return {
  2678. '_type': 'url_transparent',
  2679. 'ie_key': ThreeQSDNIE.ie_key(),
  2680. 'url': self._proto_relative_url(threeqsdn_url),
  2681. 'title': video_title,
  2682. 'description': video_description,
  2683. 'thumbnail': video_thumbnail,
  2684. 'uploader': video_uploader,
  2685. }
  2686. # Look for VBOX7 embeds
  2687. vbox7_url = Vbox7IE._extract_url(webpage)
  2688. if vbox7_url:
  2689. return self.url_result(vbox7_url, Vbox7IE.ie_key())
  2690. # Look for DBTV embeds
  2691. dbtv_urls = DBTVIE._extract_urls(webpage)
  2692. if dbtv_urls:
  2693. return self.playlist_from_matches(dbtv_urls, video_id, video_title, ie=DBTVIE.ie_key())
  2694. # Look for Videa embeds
  2695. videa_urls = VideaIE._extract_urls(webpage)
  2696. if videa_urls:
  2697. return self.playlist_from_matches(videa_urls, video_id, video_title, ie=VideaIE.ie_key())
  2698. # Look for 20 minuten embeds
  2699. twentymin_urls = TwentyMinutenIE._extract_urls(webpage)
  2700. if twentymin_urls:
  2701. return self.playlist_from_matches(
  2702. twentymin_urls, video_id, video_title, ie=TwentyMinutenIE.ie_key())
  2703. # Look for Openload embeds
  2704. openload_urls = OpenloadIE._extract_urls(webpage)
  2705. if openload_urls:
  2706. return self.playlist_from_matches(
  2707. openload_urls, video_id, video_title, ie=OpenloadIE.ie_key())
  2708. # Look for VideoPress embeds
  2709. videopress_urls = VideoPressIE._extract_urls(webpage)
  2710. if videopress_urls:
  2711. return self.playlist_from_matches(
  2712. videopress_urls, video_id, video_title, ie=VideoPressIE.ie_key())
  2713. # Look for Rutube embeds
  2714. rutube_urls = RutubeIE._extract_urls(webpage)
  2715. if rutube_urls:
  2716. return self.playlist_from_matches(
  2717. rutube_urls, video_id, video_title, ie=RutubeIE.ie_key())
  2718. # Look for WashingtonPost embeds
  2719. wapo_urls = WashingtonPostIE._extract_urls(webpage)
  2720. if wapo_urls:
  2721. return self.playlist_from_matches(
  2722. wapo_urls, video_id, video_title, ie=WashingtonPostIE.ie_key())
  2723. # Look for Mediaset embeds
  2724. mediaset_urls = MediasetIE._extract_urls(webpage)
  2725. if mediaset_urls:
  2726. return self.playlist_from_matches(
  2727. mediaset_urls, video_id, video_title, ie=MediasetIE.ie_key())
  2728. # Look for JOJ.sk embeds
  2729. joj_urls = JojIE._extract_urls(webpage)
  2730. if joj_urls:
  2731. return self.playlist_from_matches(
  2732. joj_urls, video_id, video_title, ie=JojIE.ie_key())
  2733. # Look for megaphone.fm embeds
  2734. mpfn_urls = MegaphoneIE._extract_urls(webpage)
  2735. if mpfn_urls:
  2736. return self.playlist_from_matches(
  2737. mpfn_urls, video_id, video_title, ie=MegaphoneIE.ie_key())
  2738. # Look for vzaar embeds
  2739. vzaar_urls = VzaarIE._extract_urls(webpage)
  2740. if vzaar_urls:
  2741. return self.playlist_from_matches(
  2742. vzaar_urls, video_id, video_title, ie=VzaarIE.ie_key())
  2743. channel9_urls = Channel9IE._extract_urls(webpage)
  2744. if channel9_urls:
  2745. return self.playlist_from_matches(
  2746. channel9_urls, video_id, video_title, ie=Channel9IE.ie_key())
  2747. vshare_urls = VShareIE._extract_urls(webpage)
  2748. if vshare_urls:
  2749. return self.playlist_from_matches(
  2750. vshare_urls, video_id, video_title, ie=VShareIE.ie_key())
  2751. # Look for Mediasite embeds
  2752. mediasite_urls = MediasiteIE._extract_urls(webpage)
  2753. if mediasite_urls:
  2754. entries = [
  2755. self.url_result(smuggle_url(
  2756. compat_urlparse.urljoin(url, mediasite_url),
  2757. {'UrlReferrer': url}), ie=MediasiteIE.ie_key())
  2758. for mediasite_url in mediasite_urls]
  2759. return self.playlist_result(entries, video_id, video_title)
  2760. def merge_dicts(dict1, dict2):
  2761. merged = {}
  2762. for k, v in dict1.items():
  2763. if v is not None:
  2764. merged[k] = v
  2765. for k, v in dict2.items():
  2766. if v is None:
  2767. continue
  2768. if (k not in merged or
  2769. (isinstance(v, compat_str) and v and
  2770. isinstance(merged[k], compat_str) and
  2771. not merged[k])):
  2772. merged[k] = v
  2773. return merged
  2774. # Look for HTML5 media
  2775. entries = self._parse_html5_media_entries(url, webpage, video_id, m3u8_id='hls')
  2776. if entries:
  2777. if len(entries) == 1:
  2778. entries[0].update({
  2779. 'id': video_id,
  2780. 'title': video_title,
  2781. })
  2782. else:
  2783. for num, entry in enumerate(entries, start=1):
  2784. entry.update({
  2785. 'id': '%s-%s' % (video_id, num),
  2786. 'title': '%s (%d)' % (video_title, num),
  2787. })
  2788. for entry in entries:
  2789. self._sort_formats(entry['formats'])
  2790. return self.playlist_result(entries, video_id, video_title)
  2791. jwplayer_data = self._find_jwplayer_data(
  2792. webpage, video_id, transform_source=js_to_json)
  2793. if jwplayer_data:
  2794. info = self._parse_jwplayer_data(
  2795. jwplayer_data, video_id, require_title=False, base_url=url)
  2796. return merge_dicts(info, info_dict)
  2797. # Video.js embed
  2798. mobj = re.search(
  2799. r'(?s)\bvideojs\s*\(.+?\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
  2800. webpage)
  2801. if mobj is not None:
  2802. sources = self._parse_json(
  2803. mobj.group(1), video_id, transform_source=js_to_json,
  2804. fatal=False) or []
  2805. if not isinstance(sources, list):
  2806. sources = [sources]
  2807. formats = []
  2808. for source in sources:
  2809. src = source.get('src')
  2810. if not src or not isinstance(src, compat_str):
  2811. continue
  2812. src = compat_urlparse.urljoin(url, src)
  2813. src_type = source.get('type')
  2814. if isinstance(src_type, compat_str):
  2815. src_type = src_type.lower()
  2816. ext = determine_ext(src).lower()
  2817. if src_type == 'video/youtube':
  2818. return self.url_result(src, YoutubeIE.ie_key())
  2819. if src_type == 'application/dash+xml' or ext == 'mpd':
  2820. formats.extend(self._extract_mpd_formats(
  2821. src, video_id, mpd_id='dash', fatal=False))
  2822. elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
  2823. formats.extend(self._extract_m3u8_formats(
  2824. src, video_id, 'mp4', entry_protocol='m3u8_native',
  2825. m3u8_id='hls', fatal=False))
  2826. else:
  2827. formats.append({
  2828. 'url': src,
  2829. 'ext': (mimetype2ext(src_type) or
  2830. ext if ext in KNOWN_EXTENSIONS else 'mp4'),
  2831. })
  2832. if formats:
  2833. self._sort_formats(formats)
  2834. info_dict['formats'] = formats
  2835. return info_dict
  2836. # Looking for http://schema.org/VideoObject
  2837. json_ld = self._search_json_ld(
  2838. webpage, video_id, default={}, expected_type='VideoObject')
  2839. if json_ld.get('url'):
  2840. return merge_dicts(json_ld, info_dict)
  2841. def check_video(vurl):
  2842. if YoutubeIE.suitable(vurl):
  2843. return True
  2844. if RtmpIE.suitable(vurl):
  2845. return True
  2846. vpath = compat_urlparse.urlparse(vurl).path
  2847. vext = determine_ext(vpath)
  2848. return '.' in vpath and vext not in ('swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
  2849. def filter_video(urls):
  2850. return list(filter(check_video, urls))
  2851. # Start with something easy: JW Player in SWFObject
  2852. found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
  2853. if not found:
  2854. # Look for gorilla-vid style embedding
  2855. found = filter_video(re.findall(r'''(?sx)
  2856. (?:
  2857. jw_plugins|
  2858. JWPlayerOptions|
  2859. jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
  2860. )
  2861. .*?
  2862. ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
  2863. if not found:
  2864. # Broaden the search a little bit
  2865. found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
  2866. if not found:
  2867. # Broaden the findall a little bit: JWPlayer JS loader
  2868. found = filter_video(re.findall(
  2869. r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
  2870. if not found:
  2871. # Flow player
  2872. found = filter_video(re.findall(r'''(?xs)
  2873. flowplayer\("[^"]+",\s*
  2874. \{[^}]+?\}\s*,
  2875. \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
  2876. ["']?url["']?\s*:\s*["']([^"']+)["']
  2877. ''', webpage))
  2878. if not found:
  2879. # Cinerama player
  2880. found = re.findall(
  2881. r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
  2882. if not found:
  2883. # Try to find twitter cards info
  2884. # twitter:player:stream should be checked before twitter:player since
  2885. # it is expected to contain a raw stream (see
  2886. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2887. found = filter_video(re.findall(
  2888. r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
  2889. if not found:
  2890. # We look for Open Graph info:
  2891. # We have to match any number spaces between elements, some sites try to align them (eg.: statigr.am)
  2892. m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
  2893. # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
  2894. if m_video_type is not None:
  2895. found = filter_video(re.findall(r'<meta.*?property="og:video".*?content="(.*?)"', webpage))
  2896. if not found:
  2897. REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
  2898. found = re.search(
  2899. r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
  2900. r'(?:[a-z-]+="[^"]+"\s+)*?content="%s' % REDIRECT_REGEX,
  2901. webpage)
  2902. if not found:
  2903. # Look also in Refresh HTTP header
  2904. refresh_header = head_response.headers.get('Refresh')
  2905. if refresh_header:
  2906. # In python 2 response HTTP headers are bytestrings
  2907. if sys.version_info < (3, 0) and isinstance(refresh_header, str):
  2908. refresh_header = refresh_header.decode('iso-8859-1')
  2909. found = re.search(REDIRECT_REGEX, refresh_header)
  2910. if found:
  2911. new_url = compat_urlparse.urljoin(url, unescapeHTML(found.group(1)))
  2912. if new_url != url:
  2913. self.report_following_redirect(new_url)
  2914. return {
  2915. '_type': 'url',
  2916. 'url': new_url,
  2917. }
  2918. else:
  2919. found = None
  2920. if not found:
  2921. # twitter:player is a https URL to iframe player that may or may not
  2922. # be supported by youtube-dl thus this is checked the very last (see
  2923. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2924. embed_url = self._html_search_meta('twitter:player', webpage, default=None)
  2925. if embed_url and embed_url != url:
  2926. return self.url_result(embed_url)
  2927. if not found:
  2928. raise UnsupportedError(url)
  2929. entries = []
  2930. for video_url in orderedSet(found):
  2931. video_url = unescapeHTML(video_url)
  2932. video_url = video_url.replace('\\/', '/')
  2933. video_url = compat_urlparse.urljoin(url, video_url)
  2934. video_id = compat_urllib_parse_unquote(os.path.basename(video_url))
  2935. # Sometimes, jwplayer extraction will result in a YouTube URL
  2936. if YoutubeIE.suitable(video_url):
  2937. entries.append(self.url_result(video_url, 'Youtube'))
  2938. continue
  2939. # here's a fun little line of code for you:
  2940. video_id = os.path.splitext(video_id)[0]
  2941. entry_info_dict = {
  2942. 'id': video_id,
  2943. 'uploader': video_uploader,
  2944. 'title': video_title,
  2945. 'age_limit': age_limit,
  2946. }
  2947. if RtmpIE.suitable(video_url):
  2948. entry_info_dict.update({
  2949. '_type': 'url_transparent',
  2950. 'ie_key': RtmpIE.ie_key(),
  2951. 'url': video_url,
  2952. })
  2953. entries.append(entry_info_dict)
  2954. continue
  2955. ext = determine_ext(video_url)
  2956. if ext == 'smil':
  2957. entry_info_dict['formats'] = self._extract_smil_formats(video_url, video_id)
  2958. elif ext == 'xspf':
  2959. return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
  2960. elif ext == 'm3u8':
  2961. entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4')
  2962. elif ext == 'mpd':
  2963. entry_info_dict['formats'] = self._extract_mpd_formats(video_url, video_id)
  2964. elif ext == 'f4m':
  2965. entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id)
  2966. elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
  2967. # Just matching .ism/manifest is not enough to be reliably sure
  2968. # whether it's actually an ISM manifest or some other streaming
  2969. # manifest since there are various streaming URL formats
  2970. # possible (see [1]) as well as some other shenanigans like
  2971. # .smil/manifest URLs that actually serve an ISM (see [2]) and
  2972. # so on.
  2973. # Thus the most reasonable way to solve this is to delegate
  2974. # to generic extractor in order to look into the contents of
  2975. # the manifest itself.
  2976. # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
  2977. # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
  2978. entry_info_dict = self.url_result(
  2979. smuggle_url(video_url, {'to_generic': True}),
  2980. GenericIE.ie_key())
  2981. else:
  2982. entry_info_dict['url'] = video_url
  2983. if entry_info_dict.get('formats'):
  2984. self._sort_formats(entry_info_dict['formats'])
  2985. entries.append(entry_info_dict)
  2986. if len(entries) == 1:
  2987. return entries[0]
  2988. else:
  2989. for num, e in enumerate(entries, start=1):
  2990. # 'url' results don't have a title
  2991. if e.get('title') is not None:
  2992. e['title'] = '%s (%d)' % (e['title'], num)
  2993. return {
  2994. '_type': 'playlist',
  2995. 'entries': entries,
  2996. }