generic.py 131 KB

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