generic.py 117 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840
  1. import os
  2. import re
  3. import types
  4. import urllib.parse
  5. import xml.etree.ElementTree
  6. from .common import InfoExtractor
  7. from .commonprotocols import RtmpIE
  8. from .youtube import YoutubeIE
  9. from ..compat import compat_etree_fromstring
  10. from ..utils import (
  11. KNOWN_EXTENSIONS,
  12. MEDIA_EXTENSIONS,
  13. ExtractorError,
  14. UnsupportedError,
  15. determine_ext,
  16. determine_protocol,
  17. dict_get,
  18. extract_basic_auth,
  19. filter_dict,
  20. format_field,
  21. int_or_none,
  22. is_html,
  23. js_to_json,
  24. merge_dicts,
  25. mimetype2ext,
  26. orderedSet,
  27. parse_duration,
  28. parse_resolution,
  29. smuggle_url,
  30. str_or_none,
  31. traverse_obj,
  32. try_call,
  33. unescapeHTML,
  34. unified_timestamp,
  35. unsmuggle_url,
  36. update_url_query,
  37. url_or_none,
  38. urlhandle_detect_ext,
  39. urljoin,
  40. variadic,
  41. xpath_attr,
  42. xpath_text,
  43. xpath_with_ns,
  44. )
  45. class GenericIE(InfoExtractor):
  46. IE_DESC = 'Generic downloader that works on some sites'
  47. _VALID_URL = r'.*'
  48. IE_NAME = 'generic'
  49. _NETRC_MACHINE = False # Suppress username warning
  50. _TESTS = [
  51. # Direct link to a video
  52. {
  53. 'url': 'http://media.w3.org/2010/05/sintel/trailer.mp4',
  54. 'md5': '67d406c2bcb6af27fa886f31aa934bbe',
  55. 'info_dict': {
  56. 'id': 'trailer',
  57. 'ext': 'mp4',
  58. 'title': 'trailer',
  59. 'upload_date': '20100513',
  60. 'direct': True,
  61. 'timestamp': 1273772943.0,
  62. },
  63. },
  64. # Direct link to media delivered compressed (until Accept-Encoding is *)
  65. {
  66. 'url': 'http://calimero.tk/muzik/FictionJunction-Parallel_Hearts.flac',
  67. 'md5': '128c42e68b13950268b648275386fc74',
  68. 'info_dict': {
  69. 'id': 'FictionJunction-Parallel_Hearts',
  70. 'ext': 'flac',
  71. 'title': 'FictionJunction-Parallel_Hearts',
  72. 'upload_date': '20140522',
  73. },
  74. 'expected_warnings': [
  75. 'URL could be a direct video link, returning it as such.',
  76. ],
  77. 'skip': 'URL invalid',
  78. },
  79. # Direct download with broken HEAD
  80. {
  81. 'url': 'http://ai-radio.org:8000/radio.opus',
  82. 'info_dict': {
  83. 'id': 'radio',
  84. 'ext': 'opus',
  85. 'title': 'radio',
  86. },
  87. 'params': {
  88. 'skip_download': True, # infinite live stream
  89. },
  90. 'expected_warnings': [
  91. r'501.*Not Implemented',
  92. r'400.*Bad Request',
  93. ],
  94. },
  95. # Direct link with incorrect MIME type
  96. {
  97. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  98. 'md5': '4ccbebe5f36706d85221f204d7eb5913',
  99. 'info_dict': {
  100. 'url': 'http://ftp.nluug.nl/video/nluug/2014-11-20_nj14/zaal-2/5_Lennart_Poettering_-_Systemd.webm',
  101. 'id': '5_Lennart_Poettering_-_Systemd',
  102. 'ext': 'webm',
  103. 'title': '5_Lennart_Poettering_-_Systemd',
  104. 'upload_date': '20141120',
  105. 'direct': True,
  106. 'timestamp': 1416498816.0,
  107. },
  108. 'expected_warnings': [
  109. 'URL could be a direct video link, returning it as such.',
  110. ],
  111. },
  112. # RSS feed
  113. {
  114. 'url': 'http://phihag.de/2014/youtube-dl/rss2.xml',
  115. 'info_dict': {
  116. 'id': 'https://phihag.de/2014/youtube-dl/rss2.xml',
  117. 'title': 'Zero Punctuation',
  118. 'description': 're:.*groundbreaking video review series.*',
  119. },
  120. 'playlist_mincount': 11,
  121. },
  122. # RSS feed with enclosure
  123. {
  124. 'url': 'http://podcastfeeds.nbcnews.com/audio/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  125. 'info_dict': {
  126. 'id': 'http://podcastfeeds.nbcnews.com/nbcnews/video/podcast/MSNBC-MADDOW-NETCAST-M4V.xml',
  127. 'title': 'MSNBC Rachel Maddow (video)',
  128. 'description': 're:.*her unique approach to storytelling.*',
  129. },
  130. 'playlist': [{
  131. 'info_dict': {
  132. 'ext': 'mov',
  133. 'id': 'pdv_maddow_netcast_mov-12-03-2020-223726',
  134. 'title': 'MSNBC Rachel Maddow (video) - 12-03-2020-223726',
  135. 'description': 're:.*her unique approach to storytelling.*',
  136. 'upload_date': '20201204',
  137. },
  138. }],
  139. 'skip': 'Dead link',
  140. },
  141. # RSS feed with item with description and thumbnails
  142. {
  143. 'url': 'https://anchor.fm/s/dd00e14/podcast/rss',
  144. 'info_dict': {
  145. 'id': 'https://anchor.fm/s/dd00e14/podcast/rss',
  146. 'title': 're:.*100% Hydrogen.*',
  147. 'description': 're:.*In this episode.*',
  148. },
  149. 'playlist': [{
  150. 'info_dict': {
  151. 'ext': 'm4a',
  152. 'id': '818a5d38-01cd-152f-2231-ee479677fa82',
  153. 'title': 're:Hydrogen!',
  154. 'description': 're:.*In this episode we are going.*',
  155. 'timestamp': 1567977776,
  156. 'upload_date': '20190908',
  157. 'duration': 423,
  158. 'thumbnail': r're:^https?://.*\.jpg$',
  159. 'episode_number': 1,
  160. 'season_number': 1,
  161. 'age_limit': 0,
  162. 'season': 'Season 1',
  163. 'direct': True,
  164. 'episode': 'Episode 1',
  165. },
  166. }],
  167. 'params': {
  168. 'skip_download': True,
  169. },
  170. },
  171. # RSS feed with enclosures and unsupported link URLs
  172. {
  173. 'url': 'http://www.hellointernet.fm/podcast?format=rss',
  174. 'info_dict': {
  175. 'id': 'http://www.hellointernet.fm/podcast?format=rss',
  176. 'description': 'CGP Grey and Brady Haran talk about YouTube, life, work, whatever.',
  177. 'title': 'Hello Internet',
  178. },
  179. 'playlist_mincount': 100,
  180. },
  181. # RSS feed with guid
  182. {
  183. 'url': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
  184. 'info_dict': {
  185. 'id': 'https://www.omnycontent.com/d/playlist/a7b4f8fe-59d9-4afc-a79a-a90101378abf/bf2c1d80-3656-4449-9d00-a903004e8f84/efbff746-e7c1-463a-9d80-a903004e8f8f/podcast.rss',
  186. 'description': 'md5:be809a44b63b0c56fb485caf68685520',
  187. 'title': 'The Little Red Podcast',
  188. },
  189. 'playlist_mincount': 76,
  190. },
  191. # SMIL from http://videolectures.net/promogram_igor_mekjavic_eng
  192. {
  193. 'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/video/1/smil.xml',
  194. 'info_dict': {
  195. 'id': 'smil',
  196. 'ext': 'mp4',
  197. 'title': 'Automatics, robotics and biocybernetics',
  198. 'description': 'md5:815fc1deb6b3a2bff99de2d5325be482',
  199. 'upload_date': '20130627',
  200. 'formats': 'mincount:16',
  201. 'subtitles': 'mincount:1',
  202. },
  203. 'params': {
  204. 'force_generic_extractor': True,
  205. 'skip_download': True,
  206. },
  207. },
  208. # SMIL from http://www1.wdr.de/mediathek/video/livestream/index.html
  209. {
  210. 'url': 'http://metafilegenerator.de/WDR/WDR_FS/hds/hds.smil',
  211. 'info_dict': {
  212. 'id': 'hds',
  213. 'ext': 'flv',
  214. 'title': 'hds',
  215. 'formats': 'mincount:1',
  216. },
  217. 'params': {
  218. 'skip_download': True,
  219. },
  220. },
  221. # SMIL from https://www.restudy.dk/video/play/id/1637
  222. {
  223. 'url': 'https://www.restudy.dk/awsmedia/SmilDirectory/video_1637.xml',
  224. 'info_dict': {
  225. 'id': 'video_1637',
  226. 'ext': 'flv',
  227. 'title': 'video_1637',
  228. 'formats': 'mincount:3',
  229. },
  230. 'params': {
  231. 'skip_download': True,
  232. },
  233. },
  234. # SMIL from http://adventure.howstuffworks.com/5266-cool-jobs-iditarod-musher-video.htm
  235. {
  236. 'url': 'http://services.media.howstuffworks.com/videos/450221/smil-service.smil',
  237. 'info_dict': {
  238. 'id': 'smil-service',
  239. 'ext': 'flv',
  240. 'title': 'smil-service',
  241. 'formats': 'mincount:1',
  242. },
  243. 'params': {
  244. 'skip_download': True,
  245. },
  246. },
  247. # SMIL from http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370
  248. {
  249. 'url': 'http://api.new.livestream.com/accounts/1570303/events/1585861/videos/4719370.smil',
  250. 'info_dict': {
  251. 'id': '4719370',
  252. 'ext': 'mp4',
  253. 'title': '571de1fd-47bc-48db-abf9-238872a58d1f',
  254. 'formats': 'mincount:3',
  255. },
  256. 'params': {
  257. 'skip_download': True,
  258. },
  259. },
  260. # XSPF playlist from http://www.telegraaf.nl/tv/nieuws/binnenland/24353229/__Tikibad_ontruimd_wegens_brand__.html
  261. {
  262. 'url': 'http://www.telegraaf.nl/xml/playlist/2015/8/7/mZlp2ctYIUEB.xspf',
  263. 'info_dict': {
  264. 'id': 'mZlp2ctYIUEB',
  265. 'ext': 'mp4',
  266. 'title': 'Tikibad ontruimd wegens brand',
  267. 'description': 'md5:05ca046ff47b931f9b04855015e163a4',
  268. 'thumbnail': r're:^https?://.*\.jpg$',
  269. 'duration': 33,
  270. },
  271. 'params': {
  272. 'skip_download': True,
  273. },
  274. 'skip': '404 Not Found',
  275. },
  276. # MPD from http://dash-mse-test.appspot.com/media.html
  277. {
  278. 'url': 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/car-20120827-manifest.mpd',
  279. 'md5': '4b57baab2e30d6eb3a6a09f0ba57ef53',
  280. 'info_dict': {
  281. 'id': 'car-20120827-manifest',
  282. 'ext': 'mp4',
  283. 'title': 'car-20120827-manifest',
  284. 'formats': 'mincount:9',
  285. 'upload_date': '20130904',
  286. 'timestamp': 1378272859.0,
  287. },
  288. },
  289. # m3u8 served with Content-Type: audio/x-mpegURL; charset=utf-8
  290. {
  291. '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',
  292. 'info_dict': {
  293. 'id': 'content',
  294. 'ext': 'mp4',
  295. 'title': 'content',
  296. 'formats': 'mincount:8',
  297. },
  298. 'params': {
  299. # m3u8 downloads
  300. 'skip_download': True,
  301. },
  302. 'skip': 'video gone',
  303. },
  304. # m3u8 served with Content-Type: text/plain
  305. {
  306. 'url': 'http://www.nacentapps.com/m3u8/index.m3u8',
  307. 'info_dict': {
  308. 'id': 'index',
  309. 'ext': 'mp4',
  310. 'title': 'index',
  311. 'upload_date': '20140720',
  312. 'formats': 'mincount:11',
  313. },
  314. 'params': {
  315. # m3u8 downloads
  316. 'skip_download': True,
  317. },
  318. 'skip': 'video gone',
  319. },
  320. # google redirect
  321. {
  322. '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',
  323. 'info_dict': {
  324. 'id': 'cmQHVoWB5FY',
  325. 'ext': 'mp4',
  326. 'upload_date': '20130224',
  327. 'uploader_id': '@TheVerge',
  328. 'description': r're:^Chris Ziegler takes a look at the\.*',
  329. 'uploader': 'The Verge',
  330. 'title': 'First Firefox OS phones side-by-side',
  331. },
  332. 'params': {
  333. 'skip_download': False,
  334. },
  335. },
  336. {
  337. # redirect in Refresh HTTP header
  338. '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',
  339. 'info_dict': {
  340. 'id': 'pO8h3EaFRdo',
  341. 'ext': 'mp4',
  342. 'title': 'Tripeo Boiler Room x Dekmantel Festival DJ Set',
  343. 'description': 'md5:6294cc1af09c4049e0652b51a2df10d5',
  344. 'upload_date': '20150917',
  345. 'uploader_id': 'brtvofficial',
  346. 'uploader': 'Boiler Room',
  347. },
  348. 'params': {
  349. 'skip_download': False,
  350. },
  351. },
  352. {
  353. 'url': 'http://www.hodiho.fr/2013/02/regis-plante-sa-jeep.html',
  354. 'md5': '85b90ccc9d73b4acd9138d3af4c27f89',
  355. 'info_dict': {
  356. 'id': '13601338388002',
  357. 'ext': 'mp4',
  358. 'uploader': 'www.hodiho.fr',
  359. 'title': 'R\u00e9gis plante sa Jeep',
  360. },
  361. },
  362. # bandcamp page with custom domain
  363. {
  364. 'add_ie': ['Bandcamp'],
  365. 'url': 'http://bronyrock.com/track/the-pony-mash',
  366. 'info_dict': {
  367. 'id': '3235767654',
  368. 'ext': 'mp3',
  369. 'title': 'The Pony Mash',
  370. 'uploader': 'M_Pallante',
  371. },
  372. 'skip': 'There is a limit of 200 free downloads / month for the test song',
  373. },
  374. # embed.ly video
  375. {
  376. 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/',
  377. 'info_dict': {
  378. 'id': '9ODmcdjQcHQ',
  379. 'ext': 'mp4',
  380. 'title': 'Tested: Grinding Coffee at 2000 Frames Per Second',
  381. 'upload_date': '20140225',
  382. 'description': 'md5:06a40fbf30b220468f1e0957c0f558ff',
  383. 'uploader': 'Tested',
  384. 'uploader_id': 'testedcom',
  385. },
  386. # No need to test YoutubeIE here
  387. 'params': {
  388. 'skip_download': True,
  389. },
  390. },
  391. # funnyordie embed
  392. {
  393. 'url': 'http://www.theguardian.com/world/2014/mar/11/obama-zach-galifianakis-between-two-ferns',
  394. 'info_dict': {
  395. 'id': '18e820ec3f',
  396. 'ext': 'mp4',
  397. 'title': 'Between Two Ferns with Zach Galifianakis: President Barack Obama',
  398. 'description': 'Episode 18: President Barack Obama sits down with Zach Galifianakis for his most memorable interview yet.',
  399. },
  400. # HEAD requests lead to endless 301, while GET is OK
  401. 'expected_warnings': ['301'],
  402. },
  403. # RUTV embed
  404. {
  405. 'url': 'http://www.rg.ru/2014/03/15/reg-dfo/anklav-anons.html',
  406. 'info_dict': {
  407. 'id': '776940',
  408. 'ext': 'mp4',
  409. 'title': 'Охотское море стало целиком российским',
  410. 'description': 'md5:5ed62483b14663e2a95ebbe115eb8f43',
  411. },
  412. 'params': {
  413. # m3u8 download
  414. 'skip_download': True,
  415. },
  416. },
  417. # TVC embed
  418. {
  419. '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/',
  420. 'info_dict': {
  421. 'id': '55304',
  422. 'ext': 'mp4',
  423. 'title': 'Дошкольное воспитание',
  424. },
  425. },
  426. # SportBox embed
  427. {
  428. 'url': 'http://www.vestifinance.ru/articles/25753',
  429. 'info_dict': {
  430. 'id': '25753',
  431. 'title': 'Прямые трансляции с Форума-выставки "Госзаказ-2013"',
  432. },
  433. 'playlist': [{
  434. 'info_dict': {
  435. 'id': '370908',
  436. 'title': 'Госзаказ. День 3',
  437. 'ext': 'mp4',
  438. },
  439. }, {
  440. 'info_dict': {
  441. 'id': '370905',
  442. 'title': 'Госзаказ. День 2',
  443. 'ext': 'mp4',
  444. },
  445. }, {
  446. 'info_dict': {
  447. 'id': '370902',
  448. 'title': 'Госзаказ. День 1',
  449. 'ext': 'mp4',
  450. },
  451. }],
  452. 'params': {
  453. # m3u8 download
  454. 'skip_download': True,
  455. },
  456. },
  457. # Myvi.ru embed
  458. {
  459. 'url': 'http://www.kinomyvi.tv/news/detail/Pervij-dublirovannij-trejler--Uzhastikov-_nOw1',
  460. 'info_dict': {
  461. 'id': 'f4dafcad-ff21-423d-89b5-146cfd89fa1e',
  462. 'ext': 'mp4',
  463. 'title': 'Ужастики, русский трейлер (2015)',
  464. 'thumbnail': r're:^https?://.*\.jpg$',
  465. 'duration': 153,
  466. },
  467. 'skip': 'Site dead',
  468. },
  469. # XHamster embed
  470. {
  471. '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',
  472. 'info_dict': {
  473. 'id': 'showthread',
  474. 'title': '[NSFL] [FM15] which pumiscer was this ( vid ) ( alfa as fuck srx )',
  475. },
  476. 'playlist_mincount': 7,
  477. # This forum does not allow <iframe> syntaxes anymore
  478. # Now HTML tags are displayed as-is
  479. 'skip': 'No videos on this page',
  480. },
  481. # Embedded TED video
  482. {
  483. 'url': 'http://en.support.wordpress.com/videos/ted-talks/',
  484. 'md5': '65fdff94098e4a607385a60c5177c638',
  485. 'info_dict': {
  486. 'id': '1969',
  487. 'ext': 'mp4',
  488. 'title': 'Hidden miracles of the natural world',
  489. 'uploader': 'Louie Schwartzberg',
  490. 'description': 'md5:8145d19d320ff3e52f28401f4c4283b9',
  491. },
  492. },
  493. # nowvideo embed hidden behind percent encoding
  494. {
  495. 'url': 'http://www.waoanime.tv/the-super-dimension-fortress-macross-episode-1/',
  496. 'md5': '2baf4ddd70f697d94b1c18cf796d5107',
  497. 'info_dict': {
  498. 'id': '06e53103ca9aa',
  499. 'ext': 'flv',
  500. 'title': 'Macross Episode 001 Watch Macross Episode 001 onl',
  501. 'description': 'No description',
  502. },
  503. },
  504. # arte embed
  505. {
  506. 'url': 'http://www.tv-replay.fr/redirection/20-03-14/x-enius-arte-10753389.html',
  507. 'md5': '7653032cbb25bf6c80d80f217055fa43',
  508. 'info_dict': {
  509. 'id': '048195-004_PLUS7-F',
  510. 'ext': 'flv',
  511. 'title': 'X:enius',
  512. 'description': 'md5:d5fdf32ef6613cdbfd516ae658abf168',
  513. 'upload_date': '20140320',
  514. },
  515. 'params': {
  516. 'skip_download': 'Requires rtmpdump',
  517. },
  518. 'skip': 'video gone',
  519. },
  520. # francetv embed
  521. {
  522. 'url': 'http://www.tsprod.com/replay-du-concert-alcaline-de-calogero',
  523. 'info_dict': {
  524. 'id': 'EV_30231',
  525. 'ext': 'mp4',
  526. 'title': 'Alcaline, le concert avec Calogero',
  527. 'description': 'md5:61f08036dcc8f47e9cfc33aed08ffaff',
  528. 'upload_date': '20150226',
  529. 'timestamp': 1424989860,
  530. 'duration': 5400,
  531. },
  532. 'params': {
  533. # m3u8 downloads
  534. 'skip_download': True,
  535. },
  536. 'expected_warnings': [
  537. 'Forbidden',
  538. ],
  539. },
  540. # Condé Nast embed
  541. {
  542. 'url': 'http://www.wired.com/2014/04/honda-asimo/',
  543. 'md5': 'ba0dfe966fa007657bd1443ee672db0f',
  544. 'info_dict': {
  545. 'id': '53501be369702d3275860000',
  546. 'ext': 'mp4',
  547. 'title': 'Honda’s New Asimo Robot Is More Human Than Ever',
  548. },
  549. },
  550. # Dailymotion embed
  551. {
  552. 'url': 'http://www.spi0n.com/zap-spi0n-com-n216/',
  553. 'md5': '441aeeb82eb72c422c7f14ec533999cd',
  554. 'info_dict': {
  555. 'id': 'k2mm4bCdJ6CQ2i7c8o2',
  556. 'ext': 'mp4',
  557. 'title': 'Le Zap de Spi0n n°216 - Zapping du Web',
  558. 'description': 'md5:faf028e48a461b8b7fad38f1e104b119',
  559. 'uploader': 'Spi0n',
  560. 'uploader_id': 'xgditw',
  561. 'upload_date': '20140425',
  562. 'timestamp': 1398441542,
  563. },
  564. 'add_ie': ['Dailymotion'],
  565. },
  566. # DailyMail embed
  567. {
  568. 'url': 'http://www.bumm.sk/krimi/2017/07/05/biztonsagi-kamera-buktatta-le-az-agg-ferfit-utlegelo-apolot',
  569. 'info_dict': {
  570. 'id': '1495629',
  571. 'ext': 'mp4',
  572. 'title': 'Care worker punches elderly dementia patient in head 11 times',
  573. 'description': 'md5:3a743dee84e57e48ec68bf67113199a5',
  574. },
  575. 'add_ie': ['DailyMail'],
  576. 'params': {
  577. 'skip_download': True,
  578. },
  579. },
  580. # YouTube embed
  581. {
  582. 'url': 'http://www.badzine.de/ansicht/datum/2014/06/09/so-funktioniert-die-neue-englische-badminton-liga.html',
  583. 'info_dict': {
  584. 'id': 'FXRb4ykk4S0',
  585. 'ext': 'mp4',
  586. 'title': 'The NBL Auction 2014',
  587. 'uploader': 'BADMINTON England',
  588. 'uploader_id': 'BADMINTONEvents',
  589. 'upload_date': '20140603',
  590. 'description': 'md5:9ef128a69f1e262a700ed83edb163a73',
  591. },
  592. 'add_ie': ['Youtube'],
  593. 'params': {
  594. 'skip_download': True,
  595. },
  596. },
  597. # MTVServices embed
  598. {
  599. 'url': 'http://www.vulture.com/2016/06/new-key-peele-sketches-released.html',
  600. 'md5': 'ca1aef97695ef2c1d6973256a57e5252',
  601. 'info_dict': {
  602. 'id': '769f7ec0-0692-4d62-9b45-0d88074bffc1',
  603. 'ext': 'mp4',
  604. 'title': 'Key and Peele|October 10, 2012|2|203|Liam Neesons - Uncensored',
  605. 'description': 'Two valets share their love for movie star Liam Neesons.',
  606. 'timestamp': 1349922600,
  607. 'upload_date': '20121011',
  608. },
  609. },
  610. # YouTube embed via <data-embed-url="">
  611. {
  612. 'url': 'https://play.google.com/store/apps/details?id=com.gameloft.android.ANMP.GloftA8HM',
  613. 'info_dict': {
  614. 'id': '4vAffPZIT44',
  615. 'ext': 'mp4',
  616. 'title': 'Asphalt 8: Airborne - Update - Welcome to Dubai!',
  617. 'uploader': 'Gameloft',
  618. 'uploader_id': 'gameloft',
  619. 'upload_date': '20140828',
  620. 'description': 'md5:c80da9ed3d83ae6d1876c834de03e1c4',
  621. },
  622. 'params': {
  623. 'skip_download': True,
  624. },
  625. },
  626. # Flowplayer
  627. {
  628. 'url': 'http://www.handjobhub.com/video/busty-blonde-siri-tit-fuck-while-wank-6313.html',
  629. 'md5': '9d65602bf31c6e20014319c7d07fba27',
  630. 'info_dict': {
  631. 'id': '5123ea6d5e5a7',
  632. 'ext': 'mp4',
  633. 'age_limit': 18,
  634. 'uploader': 'www.handjobhub.com',
  635. 'title': 'Busty Blonde Siri Tit Fuck While Wank at HandjobHub.com',
  636. },
  637. },
  638. # MLB embed
  639. {
  640. 'url': 'http://umpire-empire.com/index.php/topic/58125-laz-decides-no-thats-low/',
  641. 'md5': '96f09a37e44da40dd083e12d9a683327',
  642. 'info_dict': {
  643. 'id': '33322633',
  644. 'ext': 'mp4',
  645. 'title': 'Ump changes call to ball',
  646. 'description': 'md5:71c11215384298a172a6dcb4c2e20685',
  647. 'duration': 48,
  648. 'timestamp': 1401537900,
  649. 'upload_date': '20140531',
  650. 'thumbnail': r're:^https?://.*\.jpg$',
  651. },
  652. },
  653. # Wistia standard embed (async)
  654. {
  655. 'url': 'https://www.getdrip.com/university/brennan-dunn-drip-workshop/',
  656. 'info_dict': {
  657. 'id': '807fafadvk',
  658. 'ext': 'mp4',
  659. 'title': 'Drip Brennan Dunn Workshop',
  660. 'description': 'a JV Webinars video from getdrip-1',
  661. 'duration': 4986.95,
  662. 'timestamp': 1463607249,
  663. 'upload_date': '20160518',
  664. },
  665. 'params': {
  666. 'skip_download': True,
  667. },
  668. 'skip': 'webpage 404 not found',
  669. },
  670. # Soundcloud embed
  671. {
  672. 'url': 'http://nakedsecurity.sophos.com/2014/10/29/sscc-171-are-you-sure-that-1234-is-a-bad-password-podcast/',
  673. 'info_dict': {
  674. 'id': '174391317',
  675. 'ext': 'mp3',
  676. 'description': 'md5:ff867d6b555488ad3c52572bb33d432c',
  677. 'uploader': 'Sophos Security',
  678. 'title': 'Chet Chat 171 - Oct 29, 2014',
  679. 'upload_date': '20141029',
  680. },
  681. },
  682. # Soundcloud multiple embeds
  683. {
  684. 'url': 'http://www.guitarplayer.com/lessons/1014/legato-workout-one-hour-to-more-fluid-performance---tab/52809',
  685. 'info_dict': {
  686. 'id': '52809',
  687. 'title': 'Guitar Essentials: Legato Workout—One-Hour to Fluid Performance | TAB + AUDIO',
  688. },
  689. 'playlist_mincount': 7,
  690. },
  691. # TuneIn station embed
  692. {
  693. 'url': 'http://radiocnrv.com/promouvoir-radio-cnrv/',
  694. 'info_dict': {
  695. 'id': '204146',
  696. 'ext': 'mp3',
  697. 'title': 'CNRV',
  698. 'location': 'Paris, France',
  699. 'is_live': True,
  700. },
  701. 'params': {
  702. # Live stream
  703. 'skip_download': True,
  704. },
  705. },
  706. # Livestream embed
  707. {
  708. 'url': 'http://www.esa.int/Our_Activities/Space_Science/Rosetta/Philae_comet_touch-down_webcast',
  709. 'info_dict': {
  710. 'id': '67864563',
  711. 'ext': 'flv',
  712. 'upload_date': '20141112',
  713. 'title': 'Rosetta #CometLanding webcast HL 10',
  714. },
  715. },
  716. # Another Livestream embed, without 'new.' in URL
  717. {
  718. 'url': 'https://www.freespeech.org/',
  719. 'info_dict': {
  720. 'id': '123537347',
  721. 'ext': 'mp4',
  722. 'title': 're:^FSTV [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
  723. },
  724. 'params': {
  725. # Live stream
  726. 'skip_download': True,
  727. },
  728. },
  729. # LazyYT
  730. {
  731. 'url': 'https://skiplagged.com/',
  732. 'info_dict': {
  733. 'id': 'skiplagged',
  734. 'title': 'Skiplagged: The smart way to find cheap flights',
  735. },
  736. 'playlist_mincount': 1,
  737. 'add_ie': ['Youtube'],
  738. },
  739. # Libsyn embed
  740. {
  741. 'url': 'http://undergroundwellness.com/podcasts/306-5-steps-to-permanent-gut-healing/',
  742. 'info_dict': {
  743. 'id': '3793998',
  744. 'ext': 'mp3',
  745. 'upload_date': '20141126',
  746. 'title': 'Underground Wellness Radio - Jack Tips: 5 Steps to Permanent Gut Healing',
  747. 'thumbnail': 'https://assets.libsyn.com/secure/item/3793998/?height=90&width=90',
  748. 'duration': 3989.0,
  749. },
  750. },
  751. # Cinerama player
  752. {
  753. 'url': 'http://www.abc.net.au/7.30/content/2015/s4164797.htm',
  754. 'info_dict': {
  755. 'id': '730m_DandD_1901_512k',
  756. 'ext': 'mp4',
  757. 'uploader': 'www.abc.net.au',
  758. 'title': 'Game of Thrones with dice - Dungeons and Dragons fantasy role-playing game gets new life - 19/01/2015',
  759. },
  760. },
  761. # embedded viddler video
  762. {
  763. 'url': 'http://deadspin.com/i-cant-stop-watching-john-wall-chop-the-nuggets-with-th-1681801597',
  764. 'info_dict': {
  765. 'id': '4d03aad9',
  766. 'ext': 'mp4',
  767. 'uploader': 'deadspin',
  768. 'title': 'WALL-TO-GORTAT',
  769. 'timestamp': 1422285291,
  770. 'upload_date': '20150126',
  771. },
  772. 'add_ie': ['Viddler'],
  773. },
  774. # Libsyn embed
  775. {
  776. 'url': 'http://thedailyshow.cc.com/podcast/episodetwelve',
  777. 'info_dict': {
  778. 'id': '3377616',
  779. 'ext': 'mp3',
  780. 'title': "The Daily Show Podcast without Jon Stewart - Episode 12: Bassem Youssef: Egypt's Jon Stewart",
  781. 'description': 'md5:601cb790edd05908957dae8aaa866465',
  782. 'upload_date': '20150220',
  783. },
  784. 'skip': 'All The Daily Show URLs now redirect to http://www.cc.com/shows/',
  785. },
  786. # jwplayer YouTube
  787. {
  788. 'url': 'http://media.nationalarchives.gov.uk/index.php/webinar-using-discovery-national-archives-online-catalogue/',
  789. 'info_dict': {
  790. 'id': 'Mrj4DVp2zeA',
  791. 'ext': 'mp4',
  792. 'upload_date': '20150212',
  793. 'uploader': 'The National Archives UK',
  794. 'description': 'md5:8078af856dca76edc42910b61273dbbf',
  795. 'uploader_id': 'NationalArchives08',
  796. 'title': 'Webinar: Using Discovery, The National Archives’ online catalogue',
  797. },
  798. },
  799. # jwplayer rtmp
  800. {
  801. 'url': 'http://www.suffolk.edu/sjc/live.php',
  802. 'info_dict': {
  803. 'id': 'live',
  804. 'ext': 'flv',
  805. 'title': 'Massachusetts Supreme Judicial Court Oral Arguments',
  806. 'uploader': 'www.suffolk.edu',
  807. },
  808. 'params': {
  809. 'skip_download': True,
  810. },
  811. 'skip': 'Only has video a few mornings per month, see http://www.suffolk.edu/sjc/',
  812. },
  813. # jwplayer with only the json URL
  814. {
  815. 'url': 'https://www.hollywoodreporter.com/news/general-news/dunkirk-team-reveals-what-christopher-nolan-said-oscar-win-meet-your-oscar-winner-1092454',
  816. 'info_dict': {
  817. 'id': 'TljWkvWH',
  818. 'ext': 'mp4',
  819. 'upload_date': '20180306',
  820. 'title': 'md5:91eb1862f6526415214f62c00b453936',
  821. 'description': 'md5:73048ae50ae953da10549d1d2fe9b3aa',
  822. 'timestamp': 1520367225,
  823. },
  824. 'params': {
  825. 'skip_download': True,
  826. },
  827. },
  828. # Complex jwplayer
  829. {
  830. 'url': 'http://www.indiedb.com/games/king-machine/videos',
  831. 'info_dict': {
  832. 'id': 'videos',
  833. 'ext': 'mp4',
  834. 'title': 'king machine trailer 1',
  835. 'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.',
  836. 'thumbnail': r're:^https?://.*\.jpg$',
  837. },
  838. },
  839. {
  840. # Youtube embed, formerly: Video.js embed, multiple formats
  841. 'url': 'http://ortcam.com/solidworks-урок-6-настройка-чертежа_33f9b7351.html',
  842. 'info_dict': {
  843. 'id': 'yygqldloqIk',
  844. 'ext': 'mp4',
  845. 'title': 'SolidWorks. Урок 6 Настройка чертежа',
  846. 'description': 'md5:baf95267792646afdbf030e4d06b2ab3',
  847. 'upload_date': '20130314',
  848. 'uploader': 'PROстое3D',
  849. 'uploader_id': 'PROstoe3D',
  850. },
  851. 'params': {
  852. 'skip_download': True,
  853. },
  854. },
  855. {
  856. # Video.js embed, single format
  857. 'url': 'https://www.vooplayer.com/v3/watch/watch.php?v=NzgwNTg=',
  858. 'info_dict': {
  859. 'id': 'watch',
  860. 'ext': 'mp4',
  861. 'title': 'Step 1 - Good Foundation',
  862. 'description': 'md5:d1e7ff33a29fc3eb1673d6c270d344f4',
  863. },
  864. 'params': {
  865. 'skip_download': True,
  866. },
  867. 'skip': '404 Not Found',
  868. },
  869. # rtl.nl embed
  870. {
  871. 'url': 'http://www.rtlnieuws.nl/nieuws/buitenland/aanslagen-kopenhagen',
  872. 'playlist_mincount': 5,
  873. 'info_dict': {
  874. 'id': 'aanslagen-kopenhagen',
  875. 'title': 'Aanslagen Kopenhagen',
  876. },
  877. },
  878. # Zapiks embed
  879. {
  880. 'url': 'http://www.skipass.com/news/116090-bon-appetit-s5ep3-baqueira-mi-cor.html',
  881. 'info_dict': {
  882. 'id': '118046',
  883. 'ext': 'mp4',
  884. 'title': 'EP3S5 - Bon Appétit - Baqueira Mi Corazon !',
  885. },
  886. },
  887. # Kaltura embed (different embed code)
  888. {
  889. 'url': 'http://www.premierchristianradio.com/Shows/Saturday/Unbelievable/Conference-Videos/Os-Guinness-Is-It-Fools-Talk-Unbelievable-Conference-2014',
  890. 'info_dict': {
  891. 'id': '1_a52wc67y',
  892. 'ext': 'flv',
  893. 'upload_date': '20150127',
  894. 'uploader_id': 'PremierMedia',
  895. 'timestamp': int,
  896. 'title': 'Os Guinness // Is It Fools Talk? // Unbelievable? Conference 2014',
  897. },
  898. },
  899. # Kaltura embed with single quotes
  900. {
  901. 'url': 'http://fod.infobase.com/p_ViewPlaylist.aspx?AssignmentID=NUN8ZY',
  902. 'info_dict': {
  903. 'id': '0_izeg5utt',
  904. 'ext': 'mp4',
  905. 'title': '35871',
  906. 'timestamp': 1355743100,
  907. 'upload_date': '20121217',
  908. 'uploader_id': 'cplapp@learn360.com',
  909. },
  910. 'add_ie': ['Kaltura'],
  911. },
  912. {
  913. # Kaltura embedded via quoted entry_id
  914. 'url': 'https://www.oreilly.com/ideas/my-cloud-makes-pretty-pictures',
  915. 'info_dict': {
  916. 'id': '0_utuok90b',
  917. 'ext': 'mp4',
  918. 'title': '06_matthew_brender_raj_dutt',
  919. 'timestamp': 1466638791,
  920. 'upload_date': '20160622',
  921. },
  922. 'add_ie': ['Kaltura'],
  923. 'expected_warnings': [
  924. 'Could not send HEAD request',
  925. ],
  926. 'params': {
  927. 'skip_download': True,
  928. },
  929. },
  930. {
  931. # Kaltura embedded, some fileExt broken (#11480)
  932. 'url': 'http://www.cornell.edu/video/nima-arkani-hamed-standard-models-of-particle-physics',
  933. 'info_dict': {
  934. 'id': '1_sgtvehim',
  935. 'ext': 'mp4',
  936. 'title': 'Our "Standard Models" of particle physics and cosmology',
  937. 'description': 'md5:67ea74807b8c4fea92a6f38d6d323861',
  938. 'timestamp': 1321158993,
  939. 'upload_date': '20111113',
  940. 'uploader_id': 'kps1',
  941. },
  942. 'add_ie': ['Kaltura'],
  943. },
  944. {
  945. # Kaltura iframe embed
  946. 'url': 'http://www.gsd.harvard.edu/event/i-m-pei-a-centennial-celebration/',
  947. 'md5': 'ae5ace8eb09dc1a35d03b579a9c2cc44',
  948. 'info_dict': {
  949. 'id': '0_f2cfbpwy',
  950. 'ext': 'mp4',
  951. 'title': 'I. M. Pei: A Centennial Celebration',
  952. 'description': 'md5:1db8f40c69edc46ca180ba30c567f37c',
  953. 'upload_date': '20170403',
  954. 'uploader_id': 'batchUser',
  955. 'timestamp': 1491232186,
  956. },
  957. 'add_ie': ['Kaltura'],
  958. },
  959. {
  960. # Kaltura iframe embed, more sophisticated
  961. 'url': 'http://www.cns.nyu.edu/~eero/math-tools/Videos/lecture-05sep2017.html',
  962. 'info_dict': {
  963. 'id': '1_9gzouybz',
  964. 'ext': 'mp4',
  965. 'title': 'lecture-05sep2017',
  966. 'description': 'md5:40f347d91fd4ba047e511c5321064b49',
  967. 'upload_date': '20170913',
  968. 'uploader_id': 'eps2',
  969. 'timestamp': 1505340777,
  970. },
  971. 'params': {
  972. 'skip_download': True,
  973. },
  974. 'add_ie': ['Kaltura'],
  975. },
  976. {
  977. # meta twitter:player
  978. 'url': 'http://thechive.com/2017/12/08/all-i-want-for-christmas-is-more-twerk/',
  979. 'info_dict': {
  980. 'id': '0_01b42zps',
  981. 'ext': 'mp4',
  982. 'title': 'Main Twerk (Video)',
  983. 'upload_date': '20171208',
  984. 'uploader_id': 'sebastian.salinas@thechive.com',
  985. 'timestamp': 1512713057,
  986. },
  987. 'params': {
  988. 'skip_download': True,
  989. },
  990. 'add_ie': ['Kaltura'],
  991. },
  992. # referrer protected EaglePlatform embed
  993. {
  994. 'url': 'https://tvrain.ru/lite/teleshow/kak_vse_nachinalos/namin-418921/',
  995. 'info_dict': {
  996. 'id': '582306',
  997. 'ext': 'mp4',
  998. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  999. 'thumbnail': r're:^https?://.*\.jpg$',
  1000. 'duration': 3382,
  1001. 'view_count': int,
  1002. },
  1003. 'params': {
  1004. 'skip_download': True,
  1005. },
  1006. },
  1007. # ClipYou (EaglePlatform) embed (custom URL)
  1008. {
  1009. 'url': 'http://muz-tv.ru/play/7129/',
  1010. # Not checking MD5 as sometimes the direct HTTP link results in 404 and HLS is used
  1011. 'info_dict': {
  1012. 'id': '12820',
  1013. 'ext': 'mp4',
  1014. 'title': "'O Sole Mio",
  1015. 'thumbnail': r're:^https?://.*\.jpg$',
  1016. 'duration': 216,
  1017. 'view_count': int,
  1018. },
  1019. 'params': {
  1020. 'skip_download': True,
  1021. },
  1022. 'skip': 'This video is unavailable.',
  1023. },
  1024. # Pladform embed
  1025. {
  1026. 'url': 'http://muz-tv.ru/kinozal/view/7400/',
  1027. 'info_dict': {
  1028. 'id': '100183293',
  1029. 'ext': 'mp4',
  1030. 'title': 'Тайны перевала Дятлова • 1 серия 2 часть',
  1031. 'description': 'Документальный сериал-расследование одной из самых жутких тайн ХХ века',
  1032. 'thumbnail': r're:^https?://.*\.jpg$',
  1033. 'duration': 694,
  1034. 'age_limit': 0,
  1035. },
  1036. 'skip': 'HTTP Error 404: Not Found',
  1037. },
  1038. # Playwire embed
  1039. {
  1040. 'url': 'http://www.cinemablend.com/new/First-Joe-Dirt-2-Trailer-Teaser-Stupid-Greatness-70874.html',
  1041. 'info_dict': {
  1042. 'id': '3519514',
  1043. 'ext': 'mp4',
  1044. 'title': 'Joe Dirt 2 Beautiful Loser Teaser Trailer',
  1045. 'thumbnail': r're:^https?://.*\.png$',
  1046. 'duration': 45.115,
  1047. },
  1048. },
  1049. # Crooks and Liars embed
  1050. {
  1051. 'url': 'http://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists',
  1052. 'info_dict': {
  1053. 'id': '8RUoRhRi',
  1054. 'ext': 'mp4',
  1055. 'title': 'Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!',
  1056. 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f',
  1057. 'timestamp': 1428207000,
  1058. 'upload_date': '20150405',
  1059. 'uploader': 'Heather',
  1060. },
  1061. },
  1062. # Crooks and Liars external embed
  1063. {
  1064. 'url': 'http://theothermccain.com/2010/02/02/video-proves-that-bill-kristol-has-been-watching-glenn-beck/comment-page-1/',
  1065. 'info_dict': {
  1066. 'id': 'MTE3MjUtMzQ2MzA',
  1067. 'ext': 'mp4',
  1068. 'title': 'md5:5e3662a81a4014d24c250d76d41a08d5',
  1069. 'description': 'md5:9b8e9542d6c3c5de42d6451b7d780cec',
  1070. 'timestamp': 1265032391,
  1071. 'upload_date': '20100201',
  1072. 'uploader': 'Heather',
  1073. },
  1074. },
  1075. # NBC Sports vplayer embed
  1076. {
  1077. 'url': 'http://www.riderfans.com/forum/showthread.php?121827-Freeman&s=e98fa1ea6dc08e886b1678d35212494a',
  1078. 'info_dict': {
  1079. 'id': 'ln7x1qSThw4k',
  1080. 'ext': 'flv',
  1081. 'title': "PFT Live: New leader in the 'new-look' defense",
  1082. 'description': 'md5:65a19b4bbfb3b0c0c5768bed1dfad74e',
  1083. 'uploader': 'NBCU-SPORTS',
  1084. 'upload_date': '20140107',
  1085. 'timestamp': 1389118457,
  1086. },
  1087. 'skip': 'Invalid Page URL',
  1088. },
  1089. # NBC News embed
  1090. {
  1091. 'url': 'http://www.vulture.com/2016/06/letterman-couldnt-care-less-about-late-night.html',
  1092. 'md5': '1aa589c675898ae6d37a17913cf68d66',
  1093. 'info_dict': {
  1094. 'id': 'x_dtl_oa_LettermanliftPR_160608',
  1095. 'ext': 'mp4',
  1096. 'title': 'David Letterman: A Preview',
  1097. '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.',
  1098. 'upload_date': '20160609',
  1099. 'timestamp': 1465431544,
  1100. 'uploader': 'NBCU-NEWS',
  1101. },
  1102. },
  1103. # UDN embed
  1104. {
  1105. 'url': 'https://video.udn.com/news/300346',
  1106. 'md5': 'fd2060e988c326991037b9aff9df21a6',
  1107. 'info_dict': {
  1108. 'id': '300346',
  1109. 'ext': 'mp4',
  1110. 'title': '中一中男師變性 全校師生力挺',
  1111. 'thumbnail': r're:^https?://.*\.jpg$',
  1112. },
  1113. 'params': {
  1114. # m3u8 download
  1115. 'skip_download': True,
  1116. },
  1117. 'expected_warnings': ['Failed to parse JSON Expecting value'],
  1118. },
  1119. # Kinja embed
  1120. {
  1121. 'url': 'http://www.clickhole.com/video/dont-understand-bitcoin-man-will-mumble-explanatio-2537',
  1122. 'info_dict': {
  1123. 'id': '106351',
  1124. 'ext': 'mp4',
  1125. 'title': 'Don’t Understand Bitcoin? This Man Will Mumble An Explanation At You',
  1126. 'description': 'Migrated from OnionStudios',
  1127. 'thumbnail': r're:^https?://.*\.jpe?g$',
  1128. 'uploader': 'clickhole',
  1129. 'upload_date': '20150527',
  1130. 'timestamp': 1432744860,
  1131. },
  1132. },
  1133. # SnagFilms embed
  1134. {
  1135. 'url': 'http://whilewewatch.blogspot.ru/2012/06/whilewewatch-whilewewatch-gripping.html',
  1136. 'info_dict': {
  1137. 'id': '74849a00-85a9-11e1-9660-123139220831',
  1138. 'ext': 'mp4',
  1139. 'title': '#whilewewatch',
  1140. },
  1141. },
  1142. # AdobeTVVideo embed
  1143. {
  1144. 'url': 'https://helpx.adobe.com/acrobat/how-to/new-experience-acrobat-dc.html?set=acrobat--get-started--essential-beginners',
  1145. 'md5': '43662b577c018ad707a63766462b1e87',
  1146. 'info_dict': {
  1147. 'id': '2456',
  1148. 'ext': 'mp4',
  1149. 'title': 'New experience with Acrobat DC',
  1150. 'description': 'New experience with Acrobat DC',
  1151. 'duration': 248.667,
  1152. },
  1153. },
  1154. # Another form of arte.tv embed
  1155. {
  1156. 'url': 'http://www.tv-replay.fr/redirection/09-04-16/arte-reportage-arte-11508975.html',
  1157. 'md5': '850bfe45417ddf221288c88a0cffe2e2',
  1158. 'info_dict': {
  1159. 'id': '030273-562_PLUS7-F',
  1160. 'ext': 'mp4',
  1161. 'title': 'ARTE Reportage - Nulle part, en France',
  1162. 'description': 'md5:e3a0e8868ed7303ed509b9e3af2b870d',
  1163. 'upload_date': '20160409',
  1164. },
  1165. },
  1166. # Duplicated embedded video URLs
  1167. {
  1168. 'url': 'http://www.hudl.com/athlete/2538180/highlights/149298443',
  1169. 'info_dict': {
  1170. 'id': '149298443_480_16c25b74_2',
  1171. 'ext': 'mp4',
  1172. 'title': 'vs. Blue Orange Spring Game',
  1173. 'uploader': 'www.hudl.com',
  1174. },
  1175. },
  1176. # twitter:player:stream embed
  1177. {
  1178. 'url': 'http://www.rtl.be/info/video/589263.aspx?CategoryID=288',
  1179. 'info_dict': {
  1180. 'id': 'master',
  1181. 'ext': 'mp4',
  1182. 'title': 'Une nouvelle espèce de dinosaure découverte en Argentine',
  1183. 'uploader': 'www.rtl.be',
  1184. },
  1185. 'params': {
  1186. # m3u8 downloads
  1187. 'skip_download': True,
  1188. },
  1189. },
  1190. # twitter:player embed
  1191. {
  1192. 'url': 'http://www.theatlantic.com/video/index/484130/what-do-black-holes-sound-like/',
  1193. 'md5': 'a3e0df96369831de324f0778e126653c',
  1194. 'info_dict': {
  1195. 'id': '4909620399001',
  1196. 'ext': 'mp4',
  1197. 'title': 'What Do Black Holes Sound Like?',
  1198. 'description': 'what do black holes sound like',
  1199. 'upload_date': '20160524',
  1200. 'uploader_id': '29913724001',
  1201. 'timestamp': 1464107587,
  1202. 'uploader': 'TheAtlantic',
  1203. },
  1204. 'skip': 'Private Youtube video',
  1205. },
  1206. # Facebook <iframe> embed
  1207. {
  1208. 'url': 'https://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html',
  1209. 'md5': 'fbcde74f534176ecb015849146dd3aee',
  1210. 'info_dict': {
  1211. 'id': '599637780109885',
  1212. 'ext': 'mp4',
  1213. 'title': 'Facebook video #599637780109885',
  1214. },
  1215. },
  1216. # Facebook <iframe> embed, plugin video
  1217. {
  1218. 'url': 'http://5pillarsuk.com/2017/06/07/tariq-ramadan-disagrees-with-pr-exercise-by-imams-refusing-funeral-prayers-for-london-attackers/',
  1219. 'info_dict': {
  1220. 'id': '1754168231264132',
  1221. 'ext': 'mp4',
  1222. 'title': 'About the Imams and Religious leaders refusing to perform funeral prayers for...',
  1223. 'uploader': 'Tariq Ramadan (official)',
  1224. 'timestamp': 1496758379,
  1225. 'upload_date': '20170606',
  1226. },
  1227. 'params': {
  1228. 'skip_download': True,
  1229. },
  1230. },
  1231. # Facebook API embed
  1232. {
  1233. 'url': 'http://www.lothype.com/blue-stars-2016-preview-standstill-full-show/',
  1234. 'md5': 'a47372ee61b39a7b90287094d447d94e',
  1235. 'info_dict': {
  1236. 'id': '10153467542406923',
  1237. 'ext': 'mp4',
  1238. 'title': 'Facebook video #10153467542406923',
  1239. },
  1240. },
  1241. # Wordpress "YouTube Video Importer" plugin
  1242. {
  1243. 'url': 'http://www.lothype.com/blue-devils-drumline-stanford-lot-2016/',
  1244. 'md5': 'd16797741b560b485194eddda8121b48',
  1245. 'info_dict': {
  1246. 'id': 'HNTXWDXV9Is',
  1247. 'ext': 'mp4',
  1248. 'title': 'Blue Devils Drumline Stanford lot 2016',
  1249. 'upload_date': '20160627',
  1250. 'uploader_id': 'GENOCIDE8GENERAL10',
  1251. 'uploader': 'cylus cyrus',
  1252. },
  1253. },
  1254. {
  1255. # video stored on custom kaltura server
  1256. 'url': 'http://www.expansion.com/multimedia/videos.html?media=EQcM30NHIPv',
  1257. 'md5': '537617d06e64dfed891fa1593c4b30cc',
  1258. 'info_dict': {
  1259. 'id': '0_1iotm5bh',
  1260. 'ext': 'mp4',
  1261. 'title': 'Elecciones británicas: 5 lecciones para Rajoy',
  1262. 'description': 'md5:435a89d68b9760b92ce67ed227055f16',
  1263. 'uploader_id': 'videos.expansion@el-mundo.net',
  1264. 'upload_date': '20150429',
  1265. 'timestamp': 1430303472,
  1266. },
  1267. 'add_ie': ['Kaltura'],
  1268. },
  1269. {
  1270. # multiple kaltura embeds, nsfw
  1271. 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html',
  1272. 'info_dict': {
  1273. 'id': 'kamila-avec-video-jaime-sadomie',
  1274. 'title': "Kamila avec vídeo “J'aime sadomie”",
  1275. },
  1276. 'playlist_count': 8,
  1277. },
  1278. {
  1279. # Non-standard Vimeo embed
  1280. 'url': 'https://openclassrooms.com/courses/understanding-the-web',
  1281. 'md5': '64d86f1c7d369afd9a78b38cbb88d80a',
  1282. 'info_dict': {
  1283. 'id': '148867247',
  1284. 'ext': 'mp4',
  1285. 'title': 'Understanding the web - Teaser',
  1286. 'description': 'This is "Understanding the web - Teaser" by openclassrooms on Vimeo, the home for high quality videos and the people who love them.',
  1287. 'upload_date': '20151214',
  1288. 'uploader': 'OpenClassrooms',
  1289. 'uploader_id': 'openclassrooms',
  1290. },
  1291. 'add_ie': ['Vimeo'],
  1292. },
  1293. {
  1294. # generic vimeo embed that requires original URL passed as Referer
  1295. 'url': 'http://racing4everyone.eu/2016/07/30/formula-1-2016-round12-germany/',
  1296. 'only_matching': True,
  1297. },
  1298. {
  1299. 'url': 'https://support.arkena.com/display/PLAY/Ways+to+embed+your+video',
  1300. 'md5': 'b96f2f71b359a8ecd05ce4e1daa72365',
  1301. 'info_dict': {
  1302. 'id': 'b41dda37-d8e7-4d3f-b1b5-9a9db578bdfe',
  1303. 'ext': 'mp4',
  1304. 'title': 'Big Buck Bunny',
  1305. 'description': 'Royalty free test video',
  1306. 'timestamp': 1432816365,
  1307. 'upload_date': '20150528',
  1308. 'is_live': False,
  1309. },
  1310. 'params': {
  1311. 'skip_download': True,
  1312. },
  1313. 'add_ie': ['Arkena'],
  1314. },
  1315. {
  1316. '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/',
  1317. 'info_dict': {
  1318. 'id': '1c7141f46c',
  1319. 'ext': 'mp4',
  1320. 'title': 'НА КОСЪМ ОТ ВЗРИВ: Изтичане на газ на бензиностанция в Пловдив',
  1321. },
  1322. 'params': {
  1323. 'skip_download': True,
  1324. },
  1325. 'add_ie': ['Vbox7'],
  1326. },
  1327. {
  1328. # DBTV embeds
  1329. 'url': 'http://www.dagbladet.no/2016/02/23/nyheter/nordlys/ski/troms/ver/43254897/',
  1330. 'info_dict': {
  1331. 'id': '43254897',
  1332. 'title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',
  1333. },
  1334. 'playlist_mincount': 3,
  1335. },
  1336. {
  1337. # Videa embeds
  1338. 'url': 'http://forum.dvdtalk.com/movie-talk/623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style.html',
  1339. 'info_dict': {
  1340. 'id': '623756-deleted-magic-star-wars-ot-deleted-alt-scenes-docu-style',
  1341. 'title': 'Deleted Magic - Star Wars: OT Deleted / Alt. Scenes Docu. Style - DVD Talk Forum',
  1342. },
  1343. 'playlist_mincount': 2,
  1344. },
  1345. {
  1346. # 20 minuten embed
  1347. 'url': 'http://www.20min.ch/schweiz/news/story/So-kommen-Sie-bei-Eis-und-Schnee-sicher-an-27032552',
  1348. 'info_dict': {
  1349. 'id': '523629',
  1350. 'ext': 'mp4',
  1351. 'title': 'So kommen Sie bei Eis und Schnee sicher an',
  1352. 'description': 'md5:117c212f64b25e3d95747e5276863f7d',
  1353. },
  1354. 'params': {
  1355. 'skip_download': True,
  1356. },
  1357. 'add_ie': ['TwentyMinuten'],
  1358. },
  1359. {
  1360. # VideoPress embed
  1361. 'url': 'https://en.support.wordpress.com/videopress/',
  1362. 'info_dict': {
  1363. 'id': 'OcobLTqC',
  1364. 'ext': 'm4v',
  1365. 'title': 'IMG_5786',
  1366. 'timestamp': 1435711927,
  1367. 'upload_date': '20150701',
  1368. },
  1369. 'params': {
  1370. 'skip_download': True,
  1371. },
  1372. 'add_ie': ['VideoPress'],
  1373. },
  1374. {
  1375. # Rutube embed
  1376. 'url': 'http://magazzino.friday.ru/videos/vipuski/kazan-2',
  1377. 'info_dict': {
  1378. 'id': '9b3d5bee0a8740bf70dfd29d3ea43541',
  1379. 'ext': 'flv',
  1380. 'title': 'Магаззино: Казань 2',
  1381. 'description': 'md5:99bccdfac2269f0e8fdbc4bbc9db184a',
  1382. 'uploader': 'Магаззино',
  1383. 'upload_date': '20170228',
  1384. 'uploader_id': '996642',
  1385. },
  1386. 'params': {
  1387. 'skip_download': True,
  1388. },
  1389. 'add_ie': ['Rutube'],
  1390. },
  1391. {
  1392. # glomex:embed
  1393. 'url': 'https://www.skai.gr/news/world/iatrikos-syllogos-tourkias-to-turkovac-aplo-dialyma-erntogan-eiste-apateones-kai-pseytes',
  1394. 'info_dict': {
  1395. 'id': 'v-ch2nkhcirwc9-sf',
  1396. 'ext': 'mp4',
  1397. 'title': 'md5:786e1e24e06c55993cee965ef853a0c1',
  1398. 'description': 'md5:8b517a61d577efe7e36fde72fd535995',
  1399. 'timestamp': 1641885019,
  1400. 'upload_date': '20220111',
  1401. 'duration': 460000,
  1402. 'thumbnail': 'https://i3thumbs.glomex.com/dC1idjJwdndiMjRzeGwvMjAyMi8wMS8xMS8wNy8xMF8zNV82MWRkMmQ2YmU5ZTgyLmpwZw==/profile:player-960x540',
  1403. },
  1404. },
  1405. {
  1406. # megatvcom:embed
  1407. 'url': 'https://www.in.gr/2021/12/18/greece/apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize/',
  1408. 'info_dict': {
  1409. 'id': 'apokalypsi-mega-poios-parelave-tin-ereyna-tsiodra-ek-merous-tis-kyvernisis-o-prothypourgos-telika-gnorize',
  1410. 'title': 'md5:5e569cf996ec111057c2764ec272848f',
  1411. },
  1412. 'playlist': [{
  1413. 'md5': '1afa26064ff00ccb91617957dbc73dc1',
  1414. 'info_dict': {
  1415. 'ext': 'mp4',
  1416. 'id': '564916',
  1417. 'display_id': 'md5:6cdf22d3a2e7bacb274b7295089a1770',
  1418. 'title': 'md5:33b9dd39584685b62873043670eb52a6',
  1419. 'description': 'md5:c1db7310f390518ac36dd69d947ef1a1',
  1420. 'timestamp': 1639753145,
  1421. 'upload_date': '20211217',
  1422. 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/prezerakos-1024x597.jpg',
  1423. },
  1424. }, {
  1425. 'md5': '4a1c220695f1ef865a8b7966a53e2474',
  1426. 'info_dict': {
  1427. 'ext': 'mp4',
  1428. 'id': '564905',
  1429. 'display_id': 'md5:ead15695e485e649aed2b81ebd699b88',
  1430. 'title': 'md5:2b71fd54249a3ca34609fe39ae31c47b',
  1431. 'description': 'md5:c42e12f638d0a97d6de4508e2c4df982',
  1432. 'timestamp': 1639753047,
  1433. 'upload_date': '20211217',
  1434. 'thumbnail': 'https://www.megatv.com/wp-content/uploads/2021/12/tsiodras-mitsotakis-1024x545.jpg',
  1435. },
  1436. }],
  1437. },
  1438. {
  1439. 'url': 'https://www.ertnews.gr/video/manolis-goyalles-o-anthropos-piso-apo-ti-diadiktyaki-vasilopita/',
  1440. 'info_dict': {
  1441. 'id': '2022/tv/news-themata-ianouarios/20220114-apotis6-gouales-pita.mp4',
  1442. 'ext': 'mp4',
  1443. 'title': 'md5:df64f5b61c06d0e9556c0cdd5cf14464',
  1444. 'thumbnail': 'https://www.ert.gr/themata/photos/2021/20220114-apotis6-gouales-pita.jpg',
  1445. },
  1446. },
  1447. {
  1448. # ThePlatform embedded with whitespaces in URLs
  1449. 'url': 'http://www.golfchannel.com/topics/shows/golftalkcentral.htm',
  1450. 'only_matching': True,
  1451. },
  1452. {
  1453. # Senate ISVP iframe https
  1454. 'url': 'https://www.hsgac.senate.gov/hearings/canadas-fast-track-refugee-plan-unanswered-questions-and-implications-for-us-national-security',
  1455. 'md5': 'fb8c70b0b515e5037981a2492099aab8',
  1456. 'info_dict': {
  1457. 'id': 'govtaff020316',
  1458. 'ext': 'mp4',
  1459. 'title': 'Integrated Senate Video Player',
  1460. },
  1461. 'add_ie': ['SenateISVP'],
  1462. },
  1463. {
  1464. # Limelight embeds (1 channel embed + 4 media embeds)
  1465. 'url': 'http://www.sedona.com/FacilitatorTraining2017',
  1466. 'info_dict': {
  1467. 'id': 'FacilitatorTraining2017',
  1468. 'title': 'Facilitator Training 2017',
  1469. },
  1470. 'playlist_mincount': 5,
  1471. },
  1472. {
  1473. # Limelight embed (LimelightPlayerUtil.embed)
  1474. 'url': 'https://tv5.ca/videos?v=xuu8qowr291ri',
  1475. 'info_dict': {
  1476. 'id': '95d035dc5c8a401588e9c0e6bd1e9c92',
  1477. 'ext': 'mp4',
  1478. 'title': '07448641',
  1479. 'timestamp': 1499890639,
  1480. 'upload_date': '20170712',
  1481. },
  1482. 'params': {
  1483. 'skip_download': True,
  1484. },
  1485. 'add_ie': ['LimelightMedia'],
  1486. },
  1487. {
  1488. 'url': 'http://kron4.com/2017/04/28/standoff-with-walnut-creek-murder-suspect-ends-with-arrest/',
  1489. 'info_dict': {
  1490. 'id': 'standoff-with-walnut-creek-murder-suspect-ends-with-arrest',
  1491. 'title': 'Standoff with Walnut Creek murder suspect ends',
  1492. 'description': 'md5:3ccc48a60fc9441eeccfc9c469ebf788',
  1493. },
  1494. 'playlist_mincount': 4,
  1495. },
  1496. {
  1497. # WashingtonPost embed
  1498. 'url': 'http://www.vanityfair.com/hollywood/2017/04/donald-trump-tv-pitches',
  1499. 'info_dict': {
  1500. 'id': '8caf6e88-d0ec-11e5-90d3-34c2c42653ac',
  1501. 'ext': 'mp4',
  1502. 'title': "No one has seen the drama series based on Trump's life \u2014 until now",
  1503. '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.',
  1504. 'timestamp': 1455216756,
  1505. 'uploader': 'The Washington Post',
  1506. 'upload_date': '20160211',
  1507. },
  1508. 'add_ie': ['WashingtonPost'],
  1509. },
  1510. {
  1511. # JOJ.sk embeds
  1512. 'url': 'https://www.noviny.sk/slovensko/238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1513. 'info_dict': {
  1514. 'id': '238543-slovenskom-sa-prehnala-vlna-silnych-burok',
  1515. 'title': 'Slovenskom sa prehnala vlna silných búrok',
  1516. },
  1517. 'playlist_mincount': 5,
  1518. 'add_ie': ['Joj'],
  1519. },
  1520. {
  1521. # AMP embed (see https://www.ampproject.org/docs/reference/components/amp-video)
  1522. 'url': 'https://tvrain.ru/amp/418921/',
  1523. 'md5': 'cc00413936695987e8de148b67d14f1d',
  1524. 'info_dict': {
  1525. 'id': '418921',
  1526. 'ext': 'mp4',
  1527. 'title': 'Стас Намин: «Мы нарушили девственность Кремля»',
  1528. },
  1529. },
  1530. {
  1531. # multiple HTML5 videos on one page
  1532. 'url': 'https://www.paragon-software.com/home/rk-free/keyscenarios.html',
  1533. 'info_dict': {
  1534. 'id': 'keyscenarios',
  1535. 'title': 'Rescue Kit 14 Free Edition - Getting started',
  1536. },
  1537. 'playlist_count': 4,
  1538. },
  1539. {
  1540. # vshare embed
  1541. 'url': 'https://youtube-dl-demo.neocities.org/vshare.html',
  1542. 'md5': '17b39f55b5497ae8b59f5fbce8e35886',
  1543. 'info_dict': {
  1544. 'id': '0f64ce6',
  1545. 'title': 'vl14062007715967',
  1546. 'ext': 'mp4',
  1547. },
  1548. },
  1549. {
  1550. 'url': 'http://www.heidelberg-laureate-forum.org/blog/video/lecture-friday-september-23-2016-sir-c-antony-r-hoare/',
  1551. 'md5': 'aecd089f55b1cb5a59032cb049d3a356',
  1552. 'info_dict': {
  1553. 'id': '90227f51a80c4d8f86c345a7fa62bd9a1d',
  1554. 'ext': 'mp4',
  1555. 'title': 'Lecture: Friday, September 23, 2016 - Sir Tony Hoare',
  1556. 'description': 'md5:5a51db84a62def7b7054df2ade403c6c',
  1557. 'timestamp': 1474354800,
  1558. 'upload_date': '20160920',
  1559. },
  1560. },
  1561. {
  1562. 'url': 'http://www.kidzworld.com/article/30935-trolls-the-beat-goes-on-interview-skylar-astin-and-amanda-leighton',
  1563. 'info_dict': {
  1564. 'id': '1731611',
  1565. 'ext': 'mp4',
  1566. 'title': 'Official Trailer | TROLLS: THE BEAT GOES ON!',
  1567. 'description': 'md5:eb5f23826a027ba95277d105f248b825',
  1568. 'timestamp': 1516100691,
  1569. 'upload_date': '20180116',
  1570. },
  1571. 'params': {
  1572. 'skip_download': True,
  1573. },
  1574. 'add_ie': ['SpringboardPlatform'],
  1575. },
  1576. {
  1577. 'url': 'https://www.yapfiles.ru/show/1872528/690b05d3054d2dbe1e69523aa21bb3b1.mp4.html',
  1578. 'info_dict': {
  1579. 'id': 'vMDE4NzI1Mjgt690b',
  1580. 'ext': 'mp4',
  1581. 'title': 'Котята',
  1582. },
  1583. 'add_ie': ['YapFiles'],
  1584. 'params': {
  1585. 'skip_download': True,
  1586. },
  1587. },
  1588. {
  1589. # CloudflareStream embed
  1590. 'url': 'https://www.cloudflare.com/products/cloudflare-stream/',
  1591. 'info_dict': {
  1592. 'id': '31c9291ab41fac05471db4e73aa11717',
  1593. 'ext': 'mp4',
  1594. 'title': '31c9291ab41fac05471db4e73aa11717',
  1595. },
  1596. 'add_ie': ['CloudflareStream'],
  1597. 'params': {
  1598. 'skip_download': True,
  1599. },
  1600. },
  1601. {
  1602. # PeerTube embed
  1603. 'url': 'https://joinpeertube.org/fr/home/',
  1604. 'info_dict': {
  1605. 'id': 'home',
  1606. 'title': 'Reprenez le contrôle de vos vidéos ! #JoinPeertube',
  1607. },
  1608. 'playlist_count': 2,
  1609. },
  1610. {
  1611. # Indavideo embed
  1612. 'url': 'https://streetkitchen.hu/receptek/igy_kell_otthon_hamburgert_sutni/',
  1613. 'info_dict': {
  1614. 'id': '1693903',
  1615. 'ext': 'mp4',
  1616. 'title': 'Így kell otthon hamburgert sütni',
  1617. 'description': 'md5:f5a730ecf900a5c852e1e00540bbb0f7',
  1618. 'timestamp': 1426330212,
  1619. 'upload_date': '20150314',
  1620. 'uploader': 'StreetKitchen',
  1621. 'uploader_id': '546363',
  1622. },
  1623. 'add_ie': ['IndavideoEmbed'],
  1624. 'params': {
  1625. 'skip_download': True,
  1626. },
  1627. },
  1628. {
  1629. # APA embed via JWPlatform embed
  1630. 'url': 'http://www.vol.at/blue-man-group/5593454',
  1631. 'info_dict': {
  1632. 'id': 'jjv85FdZ',
  1633. 'ext': 'mp4',
  1634. 'title': '"Blau ist mysteriös": Die Blue Man Group im Interview',
  1635. 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
  1636. 'thumbnail': r're:^https?://.*\.jpg$',
  1637. 'duration': 254,
  1638. 'timestamp': 1519211149,
  1639. 'upload_date': '20180221',
  1640. },
  1641. 'params': {
  1642. 'skip_download': True,
  1643. },
  1644. },
  1645. {
  1646. 'url': 'http://share-videos.se/auto/video/83645793?uid=13',
  1647. 'md5': 'b68d276de422ab07ee1d49388103f457',
  1648. 'info_dict': {
  1649. 'id': '83645793',
  1650. 'title': 'Lock up and get excited',
  1651. 'ext': 'mp4',
  1652. },
  1653. 'skip': 'TODO: fix nested playlists processing in tests',
  1654. },
  1655. {
  1656. # Viqeo embeds
  1657. 'url': 'https://viqeo.tv/',
  1658. 'info_dict': {
  1659. 'id': 'viqeo',
  1660. 'title': 'All-new video platform',
  1661. },
  1662. 'playlist_count': 6,
  1663. },
  1664. # {
  1665. # # Zype embed
  1666. # 'url': 'https://www.cookscountry.com/episode/554-smoky-barbecue-favorites',
  1667. # 'info_dict': {
  1668. # 'id': '5b400b834b32992a310622b9',
  1669. # 'ext': 'mp4',
  1670. # 'title': 'Smoky Barbecue Favorites',
  1671. # 'thumbnail': r're:^https?://.*\.jpe?g',
  1672. # 'description': 'md5:5ff01e76316bd8d46508af26dc86023b',
  1673. # 'upload_date': '20170909',
  1674. # 'timestamp': 1504915200,
  1675. # },
  1676. # 'add_ie': [ZypeIE.ie_key()],
  1677. # 'params': {
  1678. # 'skip_download': True,
  1679. # },
  1680. # },
  1681. {
  1682. # videojs embed
  1683. 'url': 'https://video.sibnet.ru/shell.php?videoid=3422904',
  1684. 'info_dict': {
  1685. 'id': 'shell',
  1686. 'ext': 'mp4',
  1687. 'title': 'Доставщик пиццы спросил разрешения сыграть на фортепиано',
  1688. 'description': 'md5:89209cdc587dab1e4a090453dbaa2cb1',
  1689. 'thumbnail': r're:^https?://.*\.jpg$',
  1690. },
  1691. 'params': {
  1692. 'skip_download': True,
  1693. },
  1694. 'expected_warnings': ['Failed to download MPD manifest'],
  1695. },
  1696. {
  1697. # DailyMotion embed with DM.player
  1698. 'url': 'https://www.beinsports.com/us/copa-del-rey/video/the-locker-room-valencia-beat-barca-in-copa/1203804',
  1699. 'info_dict': {
  1700. 'id': 'k6aKkGHd9FJs4mtJN39',
  1701. 'ext': 'mp4',
  1702. 'title': 'The Locker Room: Valencia Beat Barca In Copa del Rey Final',
  1703. 'description': 'This video is private.',
  1704. 'uploader_id': 'x1jf30l',
  1705. 'uploader': 'beIN SPORTS USA',
  1706. 'upload_date': '20190528',
  1707. 'timestamp': 1559062971,
  1708. },
  1709. 'params': {
  1710. 'skip_download': True,
  1711. },
  1712. },
  1713. {
  1714. # tvopengr:embed
  1715. 'url': 'https://www.ethnos.gr/World/article/190604/hparosiaxekinoynoisynomiliessthgeneyhmethskiatoypolemoypanoapothnoykrania',
  1716. 'md5': 'eb0c3995d0a6f18f6538c8e057865d7d',
  1717. 'info_dict': {
  1718. 'id': '101119',
  1719. 'ext': 'mp4',
  1720. 'display_id': 'oikarpoitondiapragmateyseonhparosias',
  1721. 'title': 'md5:b979f4d640c568617d6547035528a149',
  1722. 'description': 'md5:e54fc1977c7159b01cc11cd7d9d85550',
  1723. 'timestamp': 1641772800,
  1724. 'upload_date': '20220110',
  1725. 'thumbnail': 'https://opentv-static.siliconweb.com/imgHandler/1920/70bc39fa-895b-4918-a364-c39d2135fc6d.jpg',
  1726. },
  1727. },
  1728. {
  1729. # blogger embed
  1730. 'url': 'https://blog.tomeuvizoso.net/2019/01/a-panfrost-milestone.html',
  1731. 'md5': 'f1bc19b6ea1b0fd1d81e84ca9ec467ac',
  1732. 'info_dict': {
  1733. 'id': 'BLOGGER-video-3c740e3a49197e16-796',
  1734. 'ext': 'mp4',
  1735. 'title': 'Blogger',
  1736. 'thumbnail': r're:^https?://.*',
  1737. },
  1738. },
  1739. # {
  1740. # # TODO: find another test
  1741. # # http://schema.org/VideoObject
  1742. # 'url': 'https://flipagram.com/f/nyvTSJMKId',
  1743. # 'md5': '888dcf08b7ea671381f00fab74692755',
  1744. # 'info_dict': {
  1745. # 'id': 'nyvTSJMKId',
  1746. # 'ext': 'mp4',
  1747. # 'title': 'Flipagram by sjuria101 featuring Midnight Memories by One Direction',
  1748. # 'description': '#love for cats.',
  1749. # 'timestamp': 1461244995,
  1750. # 'upload_date': '20160421',
  1751. # },
  1752. # 'params': {
  1753. # 'force_generic_extractor': True,
  1754. # },
  1755. # },
  1756. {
  1757. # VHX Embed
  1758. 'url': 'https://demo.vhx.tv/category-c/videos/file-example-mp4-480-1-5mg-copy',
  1759. 'info_dict': {
  1760. 'id': '858208',
  1761. 'ext': 'mp4',
  1762. 'title': 'Untitled',
  1763. 'uploader_id': 'user80538407',
  1764. 'uploader': 'OTT Videos',
  1765. },
  1766. },
  1767. {
  1768. # ArcPublishing PoWa video player
  1769. 'url': 'https://www.adn.com/politics/2020/11/02/video-senate-candidates-campaign-in-anchorage-on-eve-of-election-day/',
  1770. 'md5': 'b03b2fac8680e1e5a7cc81a5c27e71b3',
  1771. 'info_dict': {
  1772. 'id': '8c99cb6e-b29c-4bc9-9173-7bf9979225ab',
  1773. 'ext': 'mp4',
  1774. 'title': 'Senate candidates wave to voters on Anchorage streets',
  1775. 'description': 'md5:91f51a6511f090617353dc720318b20e',
  1776. 'timestamp': 1604378735,
  1777. 'upload_date': '20201103',
  1778. 'duration': 1581,
  1779. },
  1780. },
  1781. {
  1782. # MyChannels SDK embed
  1783. # https://www.24kitchen.nl/populair/deskundige-dit-waarom-sommigen-gevoelig-zijn-voor-voedselallergieen
  1784. 'url': 'https://www.demorgen.be/nieuws/burgemeester-rotterdam-richt-zich-in-videoboodschap-tot-relschoppers-voelt-het-goed~b0bcfd741/',
  1785. 'md5': '90c0699c37006ef18e198c032d81739c',
  1786. 'info_dict': {
  1787. 'id': '194165',
  1788. 'ext': 'mp4',
  1789. 'title': 'Burgemeester Aboutaleb spreekt relschoppers toe',
  1790. 'timestamp': 1611740340,
  1791. 'upload_date': '20210127',
  1792. 'duration': 159,
  1793. },
  1794. },
  1795. {
  1796. # Simplecast player embed
  1797. 'url': 'https://www.bio.org/podcast',
  1798. 'info_dict': {
  1799. 'id': 'podcast',
  1800. 'title': 'I AM BIO Podcast | BIO',
  1801. },
  1802. 'playlist_mincount': 52,
  1803. }, {
  1804. # WimTv embed player
  1805. 'url': 'http://www.msmotor.tv/wearefmi-pt-2-2021/',
  1806. 'info_dict': {
  1807. 'id': 'wearefmi-pt-2-2021',
  1808. 'title': '#WEAREFMI – PT.2 – 2021 – MsMotorTV',
  1809. },
  1810. 'playlist_count': 1,
  1811. }, {
  1812. # KVS Player
  1813. 'url': 'https://www.kvs-demo.com/videos/105/kelis-4th-of-july/',
  1814. 'info_dict': {
  1815. 'id': '105',
  1816. 'display_id': 'kelis-4th-of-july',
  1817. 'ext': 'mp4',
  1818. 'title': 'Kelis - 4th Of July',
  1819. 'description': 'Kelis - 4th Of July',
  1820. 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
  1821. },
  1822. 'params': {
  1823. 'skip_download': True,
  1824. },
  1825. 'expected_warnings': ['Untested major version'],
  1826. }, {
  1827. # KVS Player
  1828. 'url': 'https://www.kvs-demo.com/embed/105/',
  1829. 'info_dict': {
  1830. 'id': '105',
  1831. 'display_id': 'kelis-4th-of-july',
  1832. 'ext': 'mp4',
  1833. 'title': 'Kelis - 4th Of July / Embed Player',
  1834. 'thumbnail': r're:https://(?:www\.)?kvs-demo.com/contents/videos_screenshots/0/105/preview.jpg',
  1835. },
  1836. 'params': {
  1837. 'skip_download': True,
  1838. },
  1839. }, {
  1840. 'url': 'https://youix.com/video/leningrad-zoj/',
  1841. 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
  1842. 'info_dict': {
  1843. 'id': '18485',
  1844. 'display_id': 'leningrad-zoj',
  1845. 'ext': 'mp4',
  1846. 'title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',
  1847. 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
  1848. },
  1849. }, {
  1850. # KVS Player
  1851. 'url': 'https://youix.com/embed/18485',
  1852. 'md5': '94f96ba95706dc3880812b27b7d8a2b8',
  1853. 'info_dict': {
  1854. 'id': '18485',
  1855. 'display_id': 'leningrad-zoj',
  1856. 'ext': 'mp4',
  1857. 'title': 'Ленинград - ЗОЖ',
  1858. 'thumbnail': r're:https://youix.com/contents/videos_screenshots/18000/18485/preview(?:_480x320_youix_com.mp4)?\.jpg',
  1859. },
  1860. }, {
  1861. # KVS Player
  1862. 'url': 'https://bogmedia.org/videos/21217/40-nochey-40-nights-2016/',
  1863. 'md5': '94166bdb26b4cb1fb9214319a629fc51',
  1864. 'info_dict': {
  1865. 'id': '21217',
  1866. 'display_id': '40-nochey-2016',
  1867. 'ext': 'mp4',
  1868. 'title': '40 ночей (2016) - BogMedia.org',
  1869. 'description': 'md5:4e6d7d622636eb7948275432eb256dc3',
  1870. 'thumbnail': 'https://bogmedia.org/contents/videos_screenshots/21000/21217/preview_480p.mp4.jpg',
  1871. },
  1872. },
  1873. {
  1874. # KVS Player (for sites that serve kt_player.js via non-https urls)
  1875. 'url': 'http://www.camhub.world/embed/389508',
  1876. 'md5': 'fbe89af4cfb59c8fd9f34a202bb03e32',
  1877. 'info_dict': {
  1878. 'id': '389508',
  1879. 'display_id': 'syren-de-mer-onlyfans-05-07-2020have-a-happy-safe-holiday5f014e68a220979bdb8cd-source',
  1880. 'ext': 'mp4',
  1881. 'title': 'Syren De Mer onlyfans_05-07-2020Have_a_happy_safe_holiday5f014e68a220979bdb8cd_source / Embed плеер',
  1882. 'thumbnail': r're:https?://www\.camhub\.world/contents/videos_screenshots/389000/389508/preview\.mp4\.jpg',
  1883. },
  1884. },
  1885. {
  1886. # Reddit-hosted video that will redirect and be processed by RedditIE
  1887. # Redirects to https://www.reddit.com/r/videos/comments/6rrwyj/that_small_heart_attack/
  1888. 'url': 'https://v.redd.it/zv89llsvexdz',
  1889. 'md5': '87f5f02f6c1582654146f830f21f8662',
  1890. 'info_dict': {
  1891. 'id': 'zv89llsvexdz',
  1892. 'ext': 'mp4',
  1893. 'timestamp': 1501941939.0,
  1894. 'title': 'That small heart attack.',
  1895. 'upload_date': '20170805',
  1896. 'uploader': 'Antw87',
  1897. },
  1898. },
  1899. {
  1900. # 1080p Reddit-hosted video that will redirect and be processed by RedditIE
  1901. 'url': 'https://v.redd.it/33hgok7dfbz71/',
  1902. 'md5': '7a1d587940242c9bb3bd6eb320b39258',
  1903. 'info_dict': {
  1904. 'id': '33hgok7dfbz71',
  1905. 'ext': 'mp4',
  1906. 'title': "The game Didn't want me to Knife that Guy I guess",
  1907. 'uploader': 'paraf1ve',
  1908. 'timestamp': 1636788683.0,
  1909. 'upload_date': '20211113',
  1910. },
  1911. },
  1912. {
  1913. # MainStreaming player
  1914. 'url': 'https://www.lactv.it/2021/10/03/lac-news24-la-settimana-03-10-2021/',
  1915. 'info_dict': {
  1916. 'id': 'EUlZfGWkGpOd',
  1917. 'title': 'La Settimana ',
  1918. 'description': '03 Ottobre ore 02:00',
  1919. 'ext': 'mp4',
  1920. 'live_status': 'not_live',
  1921. 'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster',
  1922. 'duration': 1512,
  1923. },
  1924. },
  1925. {
  1926. # Multiple gfycat iframe embeds
  1927. 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
  1928. 'info_dict': {
  1929. 'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
  1930. 'id': 'board',
  1931. },
  1932. 'playlist_count': 8,
  1933. },
  1934. {
  1935. # Multiple gfycat gifs (direct links)
  1936. 'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
  1937. 'info_dict': {
  1938. 'title': '옳게 된 크롭 니트 스테이씨 아이사',
  1939. 'id': 'board',
  1940. },
  1941. 'playlist_count': 6,
  1942. },
  1943. {
  1944. # Multiple gfycat embeds, with uppercase "IFR" in urls
  1945. 'url': 'https://kkzz.kr/?vid=2295',
  1946. 'info_dict': {
  1947. 'title': '지방시 앰버서더 에스파 카리나 움짤',
  1948. 'id': '?vid=2295',
  1949. },
  1950. 'playlist_count': 9,
  1951. },
  1952. {
  1953. # Panopto embeds
  1954. 'url': 'https://www.monash.edu/learning-teaching/teachhq/learning-technologies/panopto/how-to/insert-a-quiz-into-a-panopto-video',
  1955. 'info_dict': {
  1956. 'ext': 'mp4',
  1957. 'id': '0bd3f16c-824a-436a-8486-ac5900693aef',
  1958. 'title': 'Quizzes in Panopto',
  1959. },
  1960. },
  1961. {
  1962. # Ruutu embed
  1963. 'url': 'https://www.nelonen.fi/ohjelmat/madventures-suomi/2160731-riku-ja-tunna-lahtevat-peurajahtiin-tv-sta-tutun-biologin-kanssa---metsastysreissu-huipentuu-kasvissyojan-painajaiseen',
  1964. 'md5': 'a2513a98d3496099e6eced40f7e6a14b',
  1965. 'info_dict': {
  1966. 'id': '4044426',
  1967. 'ext': 'mp4',
  1968. 'title': 'Riku ja Tunna lähtevät peurajahtiin tv:stä tutun biologin kanssa – metsästysreissu huipentuu kasvissyöjän painajaiseen!',
  1969. 'thumbnail': r're:^https?://.+\.jpg$',
  1970. 'duration': 108,
  1971. 'series': 'Madventures Suomi',
  1972. 'description': 'md5:aa55b44bd06a1e337a6f1d0b46507381',
  1973. 'categories': ['Matkailu', 'Elämäntyyli'],
  1974. 'age_limit': 0,
  1975. 'upload_date': '20220308',
  1976. },
  1977. },
  1978. {
  1979. # Multiple Ruutu embeds
  1980. 'url': 'https://www.hs.fi/kotimaa/art-2000008762560.html',
  1981. 'info_dict': {
  1982. 'title': 'Koronavirus | Epidemiahuippu voi olla Suomessa ohi, mutta koronaviruksen poistamista yleisvaarallisten tautien joukosta harkitaan vasta syksyllä',
  1983. 'id': 'art-2000008762560',
  1984. },
  1985. 'playlist_count': 3,
  1986. },
  1987. {
  1988. # Ruutu embed in hs.fi with a single video
  1989. 'url': 'https://www.hs.fi/kotimaa/art-2000008793421.html',
  1990. 'md5': 'f8964e65d8fada6e8a562389bf366bb4',
  1991. 'info_dict': {
  1992. 'id': '4081841',
  1993. 'ext': 'mp4',
  1994. 'title': 'Puolustusvoimat siirsi panssariajoneuvoja harjoituksiin Niinisaloon 2.5.2022',
  1995. 'thumbnail': r're:^https?://.+\.jpg$',
  1996. 'duration': 138,
  1997. 'age_limit': 0,
  1998. 'upload_date': '20220504',
  1999. },
  2000. },
  2001. {
  2002. # Webpage contains double BOM
  2003. 'url': 'https://www.filmarkivet.se/movies/paris-d-moll/',
  2004. 'md5': 'df02cadc719dcc63d43288366f037754',
  2005. 'info_dict': {
  2006. 'id': 'paris-d-moll',
  2007. 'ext': 'mp4',
  2008. 'upload_date': '20220518',
  2009. 'title': 'Paris d-moll',
  2010. 'description': 'md5:319e37ea5542293db37e1e13072fe330',
  2011. 'thumbnail': 'https://www.filmarkivet.se/wp-content/uploads/parisdmoll2.jpg',
  2012. 'timestamp': 1652833414,
  2013. 'age_limit': 0,
  2014. },
  2015. },
  2016. {
  2017. 'url': 'https://www.mollymovieclub.com/p/interstellar?s=r#details',
  2018. 'md5': '198bde8bed23d0b23c70725c83c9b6d9',
  2019. 'info_dict': {
  2020. 'id': '53602801',
  2021. 'ext': 'mpga',
  2022. 'title': 'Interstellar',
  2023. 'description': 'Listen now | Episode One',
  2024. 'thumbnail': 'md5:c30d9c83f738e16d8551d7219d321538',
  2025. 'uploader': 'Molly Movie Club',
  2026. 'uploader_id': '839621',
  2027. },
  2028. },
  2029. {
  2030. 'url': 'https://www.blockedandreported.org/p/episode-117-lets-talk-about-depp?s=r',
  2031. 'md5': 'c0cc44ee7415daeed13c26e5b56d6aa0',
  2032. 'info_dict': {
  2033. 'id': '57962052',
  2034. 'ext': 'mpga',
  2035. 'title': 'md5:855b2756f0ee10f6723fa00b16266f8d',
  2036. 'description': 'md5:fe512a5e94136ad260c80bde00ea4eef',
  2037. 'thumbnail': 'md5:2218f27dfe517bb5ac16c47d0aebac59',
  2038. 'uploader': 'Blocked and Reported',
  2039. 'uploader_id': '500230',
  2040. },
  2041. },
  2042. {
  2043. 'url': 'https://www.skimag.com/video/ski-people-1980/',
  2044. 'md5': '022a7e31c70620ebec18deeab376ee03',
  2045. 'info_dict': {
  2046. 'id': 'YTmgRiNU',
  2047. 'ext': 'mp4',
  2048. 'title': '1980 Ski People',
  2049. 'timestamp': 1610407738,
  2050. 'description': 'md5:cf9c3d101452c91e141f292b19fe4843',
  2051. 'thumbnail': 'https://cdn.jwplayer.com/v2/media/YTmgRiNU/poster.jpg?width=720',
  2052. 'duration': 5688.0,
  2053. 'upload_date': '20210111',
  2054. },
  2055. },
  2056. {
  2057. 'note': 'JSON LD with multiple @type',
  2058. 'url': 'https://www.nu.nl/280161/video/hoe-een-bladvlo-dit-verwoestende-japanse-onkruid-moet-vernietigen.html',
  2059. 'md5': 'c7949f34f57273013fb7ccb1156393db',
  2060. 'info_dict': {
  2061. 'id': 'ipy2AcGL',
  2062. 'ext': 'mp4',
  2063. 'description': 'md5:6a9d644bab0dc2dc06849c2505d8383d',
  2064. 'thumbnail': r're:https://media\.nu\.nl/m/.+\.jpg',
  2065. 'title': 'Hoe een bladvlo dit verwoestende Japanse onkruid moet vernietigen',
  2066. 'timestamp': 1586577474,
  2067. 'upload_date': '20200411',
  2068. 'age_limit': 0,
  2069. 'duration': 111.0,
  2070. },
  2071. },
  2072. {
  2073. 'note': 'JSON LD with unexpected data type',
  2074. 'url': 'https://www.autoweek.nl/autotests/artikel/porsche-911-gt3-rs-rij-impressie-2/',
  2075. 'info_dict': {
  2076. 'id': 'porsche-911-gt3-rs-rij-impressie-2',
  2077. 'ext': 'mp4',
  2078. 'title': 'Test: Porsche 911 GT3 RS',
  2079. 'description': 'Je ziet het niet, maar het is er wel. Downforce, hebben we het dan over. En in de nieuwe Porsche 911 GT3 RS is er zelfs heel veel downforce.',
  2080. 'timestamp': 1664920902,
  2081. 'upload_date': '20221004',
  2082. 'thumbnail': r're:^https://media.autoweek.nl/m/.+\.jpg$',
  2083. 'age_limit': 0,
  2084. 'direct': True,
  2085. },
  2086. },
  2087. {
  2088. 'note': 'server returns data in brotli compression by default if `accept-encoding: *` is specified.',
  2089. 'url': 'https://www.extra.cz/cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
  2090. 'info_dict': {
  2091. 'id': 'cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867',
  2092. 'ext': 'mp4',
  2093. 'title': 'čauky lidi 70 finall',
  2094. 'description': 'čauky lidi 70 finall',
  2095. 'thumbnail': 'h',
  2096. 'upload_date': '20220606',
  2097. 'timestamp': 1654513791,
  2098. 'duration': 318.0,
  2099. 'direct': True,
  2100. 'age_limit': 0,
  2101. },
  2102. },
  2103. {
  2104. 'url': 'https://shooshtime.com/videos/284002/just-out-of-the-shower-joi/',
  2105. 'md5': 'e2f0a4c329f7986280b7328e24036d60',
  2106. 'info_dict': {
  2107. 'id': '284002',
  2108. 'display_id': 'just-out-of-the-shower-joi',
  2109. 'ext': 'mp4',
  2110. 'title': 'Just Out Of The Shower JOI - Shooshtime',
  2111. 'thumbnail': 'https://i.shoosh.co/contents/videos_screenshots/284000/284002/preview.mp4.jpg',
  2112. 'height': 720,
  2113. 'age_limit': 18,
  2114. },
  2115. },
  2116. {
  2117. 'note': 'Live HLS direct link',
  2118. 'url': 'https://d18j67ugtrocuq.cloudfront.net/out/v1/2767aec339144787926bd0322f72c6e9/index.m3u8',
  2119. 'info_dict': {
  2120. 'id': 'index',
  2121. 'title': r're:index',
  2122. 'ext': 'mp4',
  2123. 'live_status': 'is_live',
  2124. },
  2125. 'params': {
  2126. 'skip_download': 'm3u8',
  2127. },
  2128. },
  2129. {
  2130. 'note': 'Video.js VOD HLS',
  2131. 'url': 'https://gist.githubusercontent.com/bashonly/2aae0862c50f4a4b84f220c315767208/raw/e3380d413749dabbe804c9c2d8fd9a45142475c7/videojs_hls_test.html',
  2132. 'info_dict': {
  2133. 'id': 'videojs_hls_test',
  2134. 'title': 'video',
  2135. 'ext': 'mp4',
  2136. 'age_limit': 0,
  2137. 'duration': 1800,
  2138. },
  2139. 'params': {
  2140. 'skip_download': 'm3u8',
  2141. },
  2142. },
  2143. ]
  2144. def report_following_redirect(self, new_url):
  2145. """Report information extraction."""
  2146. self._downloader.to_screen(f'[redirect] Following redirect to {new_url}')
  2147. def report_detected(self, name, num=1, note=None):
  2148. if num > 1:
  2149. name += 's'
  2150. elif not num:
  2151. return
  2152. else:
  2153. num = 'a'
  2154. self._downloader.write_debug(f'Identified {num} {name}{format_field(note, None, "; %s")}')
  2155. def _extra_manifest_info(self, info, manifest_url):
  2156. fragment_query = self._configuration_arg('fragment_query', [None], casesense=True)[0]
  2157. if fragment_query is not None:
  2158. info['extra_param_to_segment_url'] = (
  2159. urllib.parse.urlparse(fragment_query).query or fragment_query
  2160. or urllib.parse.urlparse(manifest_url).query or None)
  2161. key_query = self._configuration_arg('key_query', [None], casesense=True)[0]
  2162. if key_query is not None:
  2163. info['extra_param_to_key_url'] = (
  2164. urllib.parse.urlparse(key_query).query or key_query
  2165. or urllib.parse.urlparse(manifest_url).query or None)
  2166. def hex_or_none(value):
  2167. return value if re.fullmatch(r'(0x)?[\da-f]+', value, re.IGNORECASE) else None
  2168. info['hls_aes'] = traverse_obj(self._configuration_arg('hls_key', casesense=True), {
  2169. 'uri': (0, {url_or_none}), 'key': (0, {hex_or_none}), 'iv': (1, {hex_or_none}),
  2170. }) or None
  2171. variant_query = self._configuration_arg('variant_query', [None], casesense=True)[0]
  2172. if variant_query is not None:
  2173. query = urllib.parse.parse_qs(
  2174. urllib.parse.urlparse(variant_query).query or variant_query
  2175. or urllib.parse.urlparse(manifest_url).query)
  2176. for fmt in self._downloader._get_formats(info):
  2177. fmt['url'] = update_url_query(fmt['url'], query)
  2178. # Attempt to detect live HLS or set VOD duration
  2179. m3u8_format = next((f for f in self._downloader._get_formats(info)
  2180. if determine_protocol(f) == 'm3u8_native'), None)
  2181. if m3u8_format:
  2182. is_live = self._configuration_arg('is_live', [None])[0]
  2183. if is_live is not None:
  2184. info['live_status'] = 'not_live' if is_live == 'false' else 'is_live'
  2185. return
  2186. headers = m3u8_format.get('http_headers') or info.get('http_headers')
  2187. duration = self._extract_m3u8_vod_duration(
  2188. m3u8_format['url'], info.get('id'), note='Checking m3u8 live status',
  2189. errnote='Failed to download m3u8 media playlist', headers=headers)
  2190. if not duration:
  2191. info['live_status'] = 'is_live'
  2192. info['duration'] = info.get('duration') or duration
  2193. def _extract_rss(self, url, video_id, doc):
  2194. NS_MAP = {
  2195. 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd',
  2196. }
  2197. entries = []
  2198. for it in doc.findall('./channel/item'):
  2199. next_url = next(
  2200. (e.attrib.get('url') for e in it.findall('./enclosure')),
  2201. xpath_text(it, 'link', fatal=False))
  2202. if not next_url:
  2203. continue
  2204. guid = try_call(lambda: it.find('guid').text)
  2205. if guid:
  2206. next_url = smuggle_url(next_url, {'force_videoid': guid})
  2207. def itunes(key):
  2208. return xpath_text(it, xpath_with_ns(f'./itunes:{key}', NS_MAP), default=None)
  2209. entries.append({
  2210. '_type': 'url_transparent',
  2211. 'url': next_url,
  2212. 'title': try_call(lambda: it.find('title').text),
  2213. 'description': xpath_text(it, 'description', default=None),
  2214. 'timestamp': unified_timestamp(xpath_text(it, 'pubDate', default=None)),
  2215. 'duration': parse_duration(itunes('duration')),
  2216. 'thumbnail': url_or_none(xpath_attr(it, xpath_with_ns('./itunes:image', NS_MAP), 'href')),
  2217. 'episode': itunes('title'),
  2218. 'episode_number': int_or_none(itunes('episode')),
  2219. 'season_number': int_or_none(itunes('season')),
  2220. 'age_limit': {'true': 18, 'yes': 18, 'false': 0, 'no': 0}.get((itunes('explicit') or '').lower()),
  2221. })
  2222. return {
  2223. '_type': 'playlist',
  2224. 'id': url,
  2225. 'title': try_call(lambda: doc.find('./channel/title').text),
  2226. 'description': try_call(lambda: doc.find('./channel/description').text),
  2227. 'entries': entries,
  2228. }
  2229. @classmethod
  2230. def _kvs_get_real_url(cls, video_url, license_code):
  2231. if not video_url.startswith('function/0/'):
  2232. return video_url # not obfuscated
  2233. parsed = urllib.parse.urlparse(video_url[len('function/0/'):])
  2234. license_token = cls._kvs_get_license_token(license_code)
  2235. urlparts = parsed.path.split('/')
  2236. HASH_LENGTH = 32
  2237. hash_ = urlparts[3][:HASH_LENGTH]
  2238. indices = list(range(HASH_LENGTH))
  2239. # Swap indices of hash according to the destination calculated from the license token
  2240. accum = 0
  2241. for src in reversed(range(HASH_LENGTH)):
  2242. accum += license_token[src]
  2243. dest = (src + accum) % HASH_LENGTH
  2244. indices[src], indices[dest] = indices[dest], indices[src]
  2245. urlparts[3] = ''.join(hash_[index] for index in indices) + urlparts[3][HASH_LENGTH:]
  2246. return urllib.parse.urlunparse(parsed._replace(path='/'.join(urlparts)))
  2247. @staticmethod
  2248. def _kvs_get_license_token(license_code):
  2249. license_code = license_code.replace('$', '')
  2250. license_values = [int(char) for char in license_code]
  2251. modlicense = license_code.replace('0', '1')
  2252. center = len(modlicense) // 2
  2253. fronthalf = int(modlicense[:center + 1])
  2254. backhalf = int(modlicense[center:])
  2255. modlicense = str(4 * abs(fronthalf - backhalf))[:center + 1]
  2256. return [
  2257. (license_values[index + offset] + current) % 10
  2258. for index, current in enumerate(map(int, modlicense))
  2259. for offset in range(4)
  2260. ]
  2261. def _extract_kvs(self, url, webpage, video_id):
  2262. flashvars = self._search_json(
  2263. r'(?s:<script\b[^>]*>.*?var\s+flashvars\s*=)',
  2264. webpage, 'flashvars', video_id, transform_source=js_to_json)
  2265. # extract the part after the last / as the display_id from the
  2266. # canonical URL.
  2267. display_id = self._search_regex(
  2268. r'(?:<link href="https?://[^"]+/(.+?)/?" rel="canonical"\s*/?>'
  2269. r'|<link rel="canonical" href="https?://[^"]+/(.+?)/?"\s*/?>)',
  2270. webpage, 'display_id', fatal=False)
  2271. title = self._html_search_regex(r'<(?:h1|title)>(?:Video: )?(.+?)</(?:h1|title)>', webpage, 'title')
  2272. thumbnail = flashvars['preview_url']
  2273. if thumbnail.startswith('//'):
  2274. protocol, _, _ = url.partition('/')
  2275. thumbnail = protocol + thumbnail
  2276. url_keys = list(filter(re.compile(r'^video_(?:url|alt_url\d*)$').match, flashvars.keys()))
  2277. formats = []
  2278. for key in url_keys:
  2279. if '/get_file/' not in flashvars[key]:
  2280. continue
  2281. format_id = flashvars.get(f'{key}_text', key)
  2282. formats.append({
  2283. 'url': urljoin(url, self._kvs_get_real_url(flashvars[key], flashvars['license_code'])),
  2284. 'format_id': format_id,
  2285. 'ext': 'mp4',
  2286. **(parse_resolution(format_id) or parse_resolution(flashvars[key])),
  2287. 'http_headers': {'Referer': url},
  2288. })
  2289. if not formats[-1].get('height'):
  2290. formats[-1]['quality'] = 1
  2291. return {
  2292. 'id': flashvars['video_id'],
  2293. 'display_id': display_id,
  2294. 'title': title,
  2295. 'thumbnail': urljoin(url, thumbnail),
  2296. 'formats': formats,
  2297. }
  2298. def _real_extract(self, url):
  2299. if url.startswith('//'):
  2300. return self.url_result(self.http_scheme() + url)
  2301. parsed_url = urllib.parse.urlparse(url)
  2302. if not parsed_url.scheme:
  2303. default_search = self.get_param('default_search')
  2304. if default_search is None:
  2305. default_search = 'fixup_error'
  2306. if default_search in ('auto', 'auto_warning', 'fixup_error'):
  2307. if re.match(r'^[^\s/]+\.[^\s/]+/', url):
  2308. self.report_warning('The url doesn\'t specify the protocol, trying with http')
  2309. return self.url_result('http://' + url)
  2310. elif default_search != 'fixup_error':
  2311. if default_search == 'auto_warning':
  2312. if re.match(r'^(?:url|URL)$', url):
  2313. raise ExtractorError(
  2314. f'Invalid URL: {url!r} . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ',
  2315. expected=True)
  2316. else:
  2317. self.report_warning(
  2318. f'Falling back to youtube search for {url} . Set --default-search "auto" to suppress this warning.')
  2319. return self.url_result('ytsearch:' + url)
  2320. if default_search in ('error', 'fixup_error'):
  2321. raise ExtractorError(
  2322. f'{url!r} is not a valid URL. '
  2323. f'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:{url}" ) to search YouTube', expected=True)
  2324. else:
  2325. if ':' not in default_search:
  2326. default_search += ':'
  2327. return self.url_result(default_search + url)
  2328. original_url = url
  2329. url, smuggled_data = unsmuggle_url(url, {})
  2330. force_videoid = None
  2331. is_intentional = smuggled_data.get('to_generic')
  2332. if 'force_videoid' in smuggled_data:
  2333. force_videoid = smuggled_data['force_videoid']
  2334. video_id = force_videoid
  2335. else:
  2336. video_id = self._generic_id(url)
  2337. # Some webservers may serve compressed content of rather big size (e.g. gzipped flac)
  2338. # making it impossible to download only chunk of the file (yet we need only 512kB to
  2339. # test whether it's HTML or not). According to yt-dlp default Accept-Encoding
  2340. # that will always result in downloading the whole file that is not desirable.
  2341. # Therefore for extraction pass we have to override Accept-Encoding to any in order
  2342. # to accept raw bytes and being able to download only a chunk.
  2343. # It may probably better to solve this by checking Content-Type for application/octet-stream
  2344. # after a HEAD request, but not sure if we can rely on this.
  2345. full_response = self._request_webpage(url, video_id, headers=filter_dict({
  2346. 'Accept-Encoding': 'identity',
  2347. 'Referer': smuggled_data.get('referer'),
  2348. }))
  2349. new_url = full_response.url
  2350. if new_url != extract_basic_auth(url)[0]:
  2351. self.report_following_redirect(new_url)
  2352. if force_videoid:
  2353. new_url = smuggle_url(new_url, {'force_videoid': force_videoid})
  2354. return self.url_result(new_url)
  2355. info_dict = {
  2356. 'id': video_id,
  2357. 'title': self._generic_title(url),
  2358. 'timestamp': unified_timestamp(full_response.headers.get('Last-Modified')),
  2359. }
  2360. # Check for direct link to a video
  2361. content_type = full_response.headers.get('Content-Type', '').lower()
  2362. m = re.match(r'^(?P<type>audio|video|application(?=/(?:ogg$|(?:vnd\.apple\.|x-)?mpegurl)))/(?P<format_id>[^;\s]+)', content_type)
  2363. if m:
  2364. self.report_detected('direct video link')
  2365. headers = filter_dict({'Referer': smuggled_data.get('referer')})
  2366. format_id = str(m.group('format_id'))
  2367. ext = determine_ext(url, default_ext=None) or urlhandle_detect_ext(full_response)
  2368. subtitles = {}
  2369. if format_id.endswith('mpegurl') or ext == 'm3u8':
  2370. formats, subtitles = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4', headers=headers)
  2371. elif format_id.endswith(('mpd', 'dash+xml')) or ext == 'mpd':
  2372. formats, subtitles = self._extract_mpd_formats_and_subtitles(url, video_id, headers=headers)
  2373. elif format_id == 'f4m' or ext == 'f4m':
  2374. formats = self._extract_f4m_formats(url, video_id, headers=headers)
  2375. else:
  2376. formats = [{
  2377. 'format_id': format_id,
  2378. 'url': url,
  2379. 'ext': ext,
  2380. 'vcodec': 'none' if m.group('type') == 'audio' else None,
  2381. }]
  2382. info_dict['direct'] = True
  2383. info_dict.update({
  2384. 'formats': formats,
  2385. 'subtitles': subtitles,
  2386. 'http_headers': headers or None,
  2387. })
  2388. self._extra_manifest_info(info_dict, url)
  2389. return info_dict
  2390. if not self.get_param('test', False) and not is_intentional:
  2391. force = self.get_param('force_generic_extractor', False)
  2392. self.report_warning('%s generic information extractor' % ('Forcing' if force else 'Falling back on'))
  2393. first_bytes = full_response.read(512)
  2394. # Is it an M3U playlist?
  2395. if first_bytes.startswith(b'#EXTM3U'):
  2396. self.report_detected('M3U playlist')
  2397. info_dict['formats'], info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(url, video_id, 'mp4')
  2398. self._extra_manifest_info(info_dict, url)
  2399. return info_dict
  2400. # Maybe it's a direct link to a video?
  2401. # Be careful not to download the whole thing!
  2402. if not is_html(first_bytes):
  2403. self.report_warning(
  2404. 'URL could be a direct video link, returning it as such.')
  2405. info_dict.update({
  2406. 'direct': True,
  2407. 'url': url,
  2408. })
  2409. return info_dict
  2410. webpage = self._webpage_read_content(
  2411. full_response, url, video_id, prefix=first_bytes)
  2412. if '<title>DPG Media Privacy Gate</title>' in webpage:
  2413. webpage = self._download_webpage(url, video_id)
  2414. self.report_extraction(video_id)
  2415. # Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
  2416. try:
  2417. try:
  2418. doc = compat_etree_fromstring(webpage)
  2419. except xml.etree.ElementTree.ParseError:
  2420. doc = compat_etree_fromstring(webpage.encode())
  2421. if doc.tag == 'rss':
  2422. self.report_detected('RSS feed')
  2423. return self._extract_rss(url, video_id, doc)
  2424. elif doc.tag == 'SmoothStreamingMedia':
  2425. info_dict['formats'], info_dict['subtitles'] = self._parse_ism_formats_and_subtitles(doc, url)
  2426. self.report_detected('ISM manifest')
  2427. return info_dict
  2428. elif re.match(r'^(?:{[^}]+})?smil$', doc.tag):
  2429. smil = self._parse_smil(doc, url, video_id)
  2430. self.report_detected('SMIL file')
  2431. return smil
  2432. elif doc.tag == '{http://xspf.org/ns/0/}playlist':
  2433. self.report_detected('XSPF playlist')
  2434. return self.playlist_result(
  2435. self._parse_xspf(
  2436. doc, video_id, xspf_url=url,
  2437. xspf_base_url=full_response.url),
  2438. video_id)
  2439. elif re.match(r'(?i)^(?:{[^}]+})?MPD$', doc.tag):
  2440. info_dict['formats'], info_dict['subtitles'] = self._parse_mpd_formats_and_subtitles(
  2441. doc,
  2442. mpd_base_url=full_response.url.rpartition('/')[0],
  2443. mpd_url=url)
  2444. self._extra_manifest_info(info_dict, url)
  2445. self.report_detected('DASH manifest')
  2446. return info_dict
  2447. elif re.match(r'^{http://ns\.adobe\.com/f4m/[12]\.0}manifest$', doc.tag):
  2448. info_dict['formats'] = self._parse_f4m_formats(doc, url, video_id)
  2449. self.report_detected('F4M manifest')
  2450. return info_dict
  2451. except xml.etree.ElementTree.ParseError:
  2452. pass
  2453. info_dict.update({
  2454. # it's tempting to parse this further, but you would
  2455. # have to take into account all the variations like
  2456. # Video Title - Site Name
  2457. # Site Name | Video Title
  2458. # Video Title - Tagline | Site Name
  2459. # and so on and so forth; it's just not practical
  2460. 'title': self._generic_title('', webpage, default='video'),
  2461. 'description': self._og_search_description(webpage, default=None),
  2462. 'thumbnail': self._og_search_thumbnail(webpage, default=None),
  2463. 'age_limit': self._rta_search(webpage),
  2464. })
  2465. self._downloader.write_debug('Looking for embeds')
  2466. embeds = list(self._extract_embeds(original_url, webpage, urlh=full_response, info_dict=info_dict))
  2467. if len(embeds) == 1:
  2468. return merge_dicts(embeds[0], info_dict)
  2469. elif embeds:
  2470. return self.playlist_result(embeds, **info_dict)
  2471. raise UnsupportedError(url)
  2472. def _extract_embeds(self, url, webpage, *, urlh=None, info_dict={}):
  2473. """Returns an iterator of video entries"""
  2474. info_dict = types.MappingProxyType(info_dict) # Prevents accidental mutation
  2475. video_id = traverse_obj(info_dict, 'display_id', 'id') or self._generic_id(url)
  2476. url, smuggled_data = unsmuggle_url(url, {})
  2477. actual_url = urlh.url if urlh else url
  2478. # Sometimes embedded video player is hidden behind percent encoding
  2479. # (e.g. https://github.com/ytdl-org/youtube-dl/issues/2448)
  2480. # Unescaping the whole page allows to handle those cases in a generic way
  2481. # FIXME: unescaping the whole page may break URLs, commenting out for now.
  2482. # There probably should be a second run of generic extractor on unescaped webpage.
  2483. # webpage = urllib.parse.unquote(webpage)
  2484. embeds = []
  2485. for ie in self._downloader._ies.values():
  2486. if ie.ie_key() in smuggled_data.get('block_ies', []):
  2487. continue
  2488. gen = ie.extract_from_webpage(self._downloader, url, webpage)
  2489. current_embeds = []
  2490. try:
  2491. while True:
  2492. current_embeds.append(next(gen))
  2493. except self.StopExtraction:
  2494. self.report_detected(f'{ie.IE_NAME} exclusive embed', len(current_embeds),
  2495. embeds and 'discarding other embeds')
  2496. return current_embeds
  2497. except StopIteration:
  2498. self.report_detected(f'{ie.IE_NAME} embed', len(current_embeds))
  2499. embeds.extend(current_embeds)
  2500. if embeds:
  2501. return embeds
  2502. jwplayer_data = self._find_jwplayer_data(
  2503. webpage, video_id, transform_source=js_to_json)
  2504. if jwplayer_data:
  2505. if isinstance(jwplayer_data.get('playlist'), str):
  2506. self.report_detected('JW Player playlist')
  2507. return [self.url_result(jwplayer_data['playlist'], 'JWPlatform')]
  2508. try:
  2509. info = self._parse_jwplayer_data(
  2510. jwplayer_data, video_id, require_title=False, base_url=url)
  2511. if traverse_obj(info, 'formats', ('entries', ..., 'formats')):
  2512. self.report_detected('JW Player data')
  2513. return [info]
  2514. except ExtractorError:
  2515. # See https://github.com/ytdl-org/youtube-dl/pull/16735
  2516. pass
  2517. # Video.js embed
  2518. mobj = re.search(
  2519. r'(?s)\bvideojs\s*\(.+?([a-zA-Z0-9_$]+)\.src\s*\(\s*((?:\[.+?\]|{.+?}))\s*\)\s*;',
  2520. webpage)
  2521. if mobj is not None:
  2522. varname = mobj.group(1)
  2523. sources = variadic(self._parse_json(
  2524. mobj.group(2), video_id, transform_source=js_to_json, fatal=False) or [])
  2525. formats, subtitles, src = [], {}, None
  2526. for source in sources:
  2527. src = source.get('src')
  2528. if not src or not isinstance(src, str):
  2529. continue
  2530. src = urllib.parse.urljoin(url, src)
  2531. src_type = source.get('type')
  2532. if isinstance(src_type, str):
  2533. src_type = src_type.lower()
  2534. ext = determine_ext(src).lower()
  2535. if src_type == 'video/youtube':
  2536. return [self.url_result(src, YoutubeIE.ie_key())]
  2537. if src_type == 'application/dash+xml' or ext == 'mpd':
  2538. fmts, subs = self._extract_mpd_formats_and_subtitles(
  2539. src, video_id, mpd_id='dash', fatal=False)
  2540. formats.extend(fmts)
  2541. self._merge_subtitles(subs, target=subtitles)
  2542. elif src_type == 'application/x-mpegurl' or ext == 'm3u8':
  2543. fmts, subs = self._extract_m3u8_formats_and_subtitles(
  2544. src, video_id, 'mp4', entry_protocol='m3u8_native',
  2545. m3u8_id='hls', fatal=False)
  2546. formats.extend(fmts)
  2547. self._merge_subtitles(subs, target=subtitles)
  2548. if not formats:
  2549. formats.append({
  2550. 'url': src,
  2551. 'ext': (mimetype2ext(src_type)
  2552. or ext if ext in KNOWN_EXTENSIONS else 'mp4'),
  2553. 'http_headers': {
  2554. 'Referer': actual_url,
  2555. },
  2556. })
  2557. # https://docs.videojs.com/player#addRemoteTextTrack
  2558. # https://html.spec.whatwg.org/multipage/media.html#htmltrackelement
  2559. for sub_match in re.finditer(rf'(?s){re.escape(varname)}' + r'\.addRemoteTextTrack\(({.+?})\s*,\s*(?:true|false)\)', webpage):
  2560. sub = self._parse_json(
  2561. sub_match.group(1), video_id, transform_source=js_to_json, fatal=False) or {}
  2562. sub_src = str_or_none(sub.get('src'))
  2563. if not sub_src:
  2564. continue
  2565. subtitles.setdefault(dict_get(sub, ('language', 'srclang')) or 'und', []).append({
  2566. 'url': urllib.parse.urljoin(url, sub_src),
  2567. 'name': sub.get('label'),
  2568. 'http_headers': {
  2569. 'Referer': actual_url,
  2570. },
  2571. })
  2572. if formats or subtitles:
  2573. self.report_detected('video.js embed')
  2574. info_dict = {'formats': formats, 'subtitles': subtitles}
  2575. if formats:
  2576. self._extra_manifest_info(info_dict, src)
  2577. return [info_dict]
  2578. # Look for generic KVS player (before json-ld bc of some urls that break otherwise)
  2579. found = self._search_regex((
  2580. r'<script\b[^>]+?\bsrc\s*=\s*(["\'])https?://(?:(?!\1)[^?#])+/kt_player\.js\?v=(?P<ver>\d+(?:\.\d+)+)\1[^>]*>',
  2581. r'kt_player\s*\(\s*(["\'])(?:(?!\1)[\w\W])+\1\s*,\s*(["\'])https?://(?:(?!\2)[^?#])+/kt_player\.swf\?v=(?P<ver>\d+(?:\.\d+)+)\2\s*,',
  2582. ), webpage, 'KVS player', group='ver', default=False)
  2583. if found:
  2584. self.report_detected('KVS Player')
  2585. if found.split('.')[0] not in ('4', '5', '6'):
  2586. self.report_warning(f'Untested major version ({found}) in player engine - download may fail.')
  2587. return [self._extract_kvs(url, webpage, video_id)]
  2588. # Looking for http://schema.org/VideoObject
  2589. json_ld = self._search_json_ld(webpage, video_id, default={})
  2590. if json_ld.get('url') not in (url, None):
  2591. self.report_detected('JSON LD')
  2592. is_direct = json_ld.get('ext') not in (None, *MEDIA_EXTENSIONS.manifests)
  2593. return [merge_dicts({
  2594. '_type': 'video' if is_direct else 'url_transparent',
  2595. 'url': smuggle_url(json_ld['url'], {
  2596. 'force_videoid': video_id,
  2597. 'to_generic': True,
  2598. 'referer': url,
  2599. }),
  2600. }, json_ld)]
  2601. def check_video(vurl):
  2602. if YoutubeIE.suitable(vurl):
  2603. return True
  2604. if RtmpIE.suitable(vurl):
  2605. return True
  2606. vpath = urllib.parse.urlparse(vurl).path
  2607. vext = determine_ext(vpath, None)
  2608. return vext not in (None, 'swf', 'png', 'jpg', 'srt', 'sbv', 'sub', 'vtt', 'ttml', 'js', 'xml')
  2609. def filter_video(urls):
  2610. return list(filter(check_video, urls))
  2611. # Start with something easy: JW Player in SWFObject
  2612. found = filter_video(re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage))
  2613. if found:
  2614. self.report_detected('JW Player in SFWObject')
  2615. else:
  2616. # Look for gorilla-vid style embedding
  2617. found = filter_video(re.findall(r'''(?sx)
  2618. (?:
  2619. jw_plugins|
  2620. JWPlayerOptions|
  2621. jwplayer\s*\(\s*["'][^'"]+["']\s*\)\s*\.setup
  2622. )
  2623. .*?
  2624. ['"]?file['"]?\s*:\s*["\'](.*?)["\']''', webpage))
  2625. if found:
  2626. self.report_detected('JW Player embed')
  2627. if not found:
  2628. # Broaden the search a little bit
  2629. found = filter_video(re.findall(r'[^A-Za-z0-9]?(?:file|source)=(http[^\'"&]*)', webpage))
  2630. if found:
  2631. self.report_detected('video file')
  2632. if not found:
  2633. # Broaden the findall a little bit: JWPlayer JS loader
  2634. found = filter_video(re.findall(
  2635. r'[^A-Za-z0-9]?(?:file|video_url)["\']?:\s*["\'](http(?![^\'"]+\.[0-9]+[\'"])[^\'"]+)["\']', webpage))
  2636. if found:
  2637. self.report_detected('JW Player JS loader')
  2638. if not found:
  2639. # Flow player
  2640. found = filter_video(re.findall(r'''(?xs)
  2641. flowplayer\("[^"]+",\s*
  2642. \{[^}]+?\}\s*,
  2643. \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s*
  2644. ["']?url["']?\s*:\s*["']([^"']+)["']
  2645. ''', webpage))
  2646. if found:
  2647. self.report_detected('Flow Player')
  2648. if not found:
  2649. # Cinerama player
  2650. found = re.findall(
  2651. r"cinerama\.embedPlayer\(\s*\'[^']+\',\s*'([^']+)'", webpage)
  2652. if found:
  2653. self.report_detected('Cinerama player')
  2654. if not found:
  2655. # Try to find twitter cards info
  2656. # twitter:player:stream should be checked before twitter:player since
  2657. # it is expected to contain a raw stream (see
  2658. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2659. found = filter_video(re.findall(
  2660. r'<meta (?:property|name)="twitter:player:stream" (?:content|value)="(.+?)"', webpage))
  2661. if found:
  2662. self.report_detected('Twitter card')
  2663. if not found:
  2664. # We look for Open Graph info:
  2665. # We have to match any number spaces between elements, some sites try to align them, e.g.: statigr.am
  2666. m_video_type = re.findall(r'<meta.*?property="og:video:type".*?content="video/(.*?)"', webpage)
  2667. # We only look in og:video if the MIME type is a video, don't try if it's a Flash player:
  2668. if m_video_type is not None:
  2669. found = filter_video(re.findall(r'<meta.*?property="og:(?:video|audio)".*?content="(.*?)"', webpage))
  2670. if found:
  2671. self.report_detected('Open Graph video info')
  2672. if not found:
  2673. REDIRECT_REGEX = r'[0-9]{,2};\s*(?:URL|url)=\'?([^\'"]+)'
  2674. found = re.search(
  2675. r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
  2676. rf'(?:[a-z-]+="[^"]+"\s+)*?content="{REDIRECT_REGEX}',
  2677. webpage)
  2678. if not found:
  2679. # Look also in Refresh HTTP header
  2680. refresh_header = urlh and urlh.headers.get('Refresh')
  2681. if refresh_header:
  2682. found = re.search(REDIRECT_REGEX, refresh_header)
  2683. if found:
  2684. new_url = urllib.parse.urljoin(url, unescapeHTML(found.group(1)))
  2685. if new_url != url:
  2686. self.report_following_redirect(new_url)
  2687. return [self.url_result(new_url)]
  2688. else:
  2689. found = None
  2690. if not found:
  2691. # twitter:player is a https URL to iframe player that may or may not
  2692. # be supported by yt-dlp thus this is checked the very last (see
  2693. # https://dev.twitter.com/cards/types/player#On_twitter.com_via_desktop_browser)
  2694. embed_url = self._html_search_meta('twitter:player', webpage, default=None)
  2695. if embed_url and embed_url != url:
  2696. self.report_detected('twitter:player iframe')
  2697. return [self.url_result(embed_url)]
  2698. if not found:
  2699. return []
  2700. domain_name = self._search_regex(r'^(?:https?://)?([^/]*)/.*', url, 'video uploader', default=None)
  2701. entries = []
  2702. for video_url in orderedSet(found):
  2703. video_url = video_url.encode().decode('unicode-escape')
  2704. video_url = unescapeHTML(video_url)
  2705. video_url = video_url.replace('\\/', '/')
  2706. video_url = urllib.parse.urljoin(url, video_url)
  2707. video_id = urllib.parse.unquote(os.path.basename(video_url))
  2708. # Sometimes, jwplayer extraction will result in a YouTube URL
  2709. if YoutubeIE.suitable(video_url):
  2710. entries.append(self.url_result(video_url, 'Youtube'))
  2711. continue
  2712. video_id = os.path.splitext(video_id)[0]
  2713. headers = {
  2714. 'referer': actual_url,
  2715. }
  2716. entry_info_dict = {
  2717. 'id': video_id,
  2718. 'uploader': domain_name,
  2719. 'title': info_dict['title'],
  2720. 'age_limit': info_dict['age_limit'],
  2721. 'http_headers': headers,
  2722. }
  2723. if RtmpIE.suitable(video_url):
  2724. entry_info_dict.update({
  2725. '_type': 'url_transparent',
  2726. 'ie_key': RtmpIE.ie_key(),
  2727. 'url': video_url,
  2728. })
  2729. entries.append(entry_info_dict)
  2730. continue
  2731. ext = determine_ext(video_url)
  2732. if ext == 'smil':
  2733. entry_info_dict = {**self._extract_smil_info(video_url, video_id), **entry_info_dict}
  2734. elif ext == 'xspf':
  2735. return [self._extract_xspf_playlist(video_url, video_id)]
  2736. elif ext == 'm3u8':
  2737. entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers)
  2738. self._extra_manifest_info(entry_info_dict, video_url)
  2739. elif ext == 'mpd':
  2740. entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers)
  2741. self._extra_manifest_info(entry_info_dict, video_url)
  2742. elif ext == 'f4m':
  2743. entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers)
  2744. elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url:
  2745. # Just matching .ism/manifest is not enough to be reliably sure
  2746. # whether it's actually an ISM manifest or some other streaming
  2747. # manifest since there are various streaming URL formats
  2748. # possible (see [1]) as well as some other shenanigans like
  2749. # .smil/manifest URLs that actually serve an ISM (see [2]) and
  2750. # so on.
  2751. # Thus the most reasonable way to solve this is to delegate
  2752. # to generic extractor in order to look into the contents of
  2753. # the manifest itself.
  2754. # 1. https://azure.microsoft.com/en-us/documentation/articles/media-services-deliver-content-overview/#streaming-url-formats
  2755. # 2. https://svs.itworkscdn.net/lbcivod/smil:itwfcdn/lbci/170976.smil/Manifest
  2756. entry_info_dict = self.url_result(
  2757. smuggle_url(video_url, {'to_generic': True}),
  2758. GenericIE.ie_key())
  2759. else:
  2760. entry_info_dict['url'] = video_url
  2761. entries.append(entry_info_dict)
  2762. if len(entries) > 1:
  2763. for num, e in enumerate(entries, start=1):
  2764. # 'url' results don't have a title
  2765. if e.get('title') is not None:
  2766. e['title'] = '{} ({})'.format(e['title'], num)
  2767. return entries