4 from .common
import InfoExtractor
5 from ..compat
import compat_str
19 class PeerTubeIE(InfoExtractor
):
20 _INSTANCES_RE
= r
'''(?:
21 # Taken from https://instances.joinpeertube.org/instances
23 3dctube\.3dcandy\.social|
24 all\.electric\.kitchen|
29 archive\.nocopyrightintended\.tv|
32 astrotube-ufe\.obspm\.fr|
34 audio\.freediverse\.com|
35 azxtube\.youssefc\.tn|
41 biblion\.refchat\.net|
42 biblioteca\.theowlclub\.net|
51 canal\.facil\.services|
54 celluloid-media\.huma-num\.fr|
55 chicago1\.peertube\.support|
57 cloudtube\.ise\.fraunhofer\.de|
59 comics\.peertube\.biz|
61 communitymedia\.video|
62 conspiracydistillery\.com|
67 darkvapor\.nohost\.me|
68 daschauher\.aksel\.rocks|
69 digitalcourage\.video|
72 dud-video\.inf\.tu-dresden\.de|
73 dud175\.inf\.tu-dresden\.de|
75 ebildungslabor\.video|
85 fotogramas\.politicaconciencia\.org|
87 freesoto-u2151\.vm\.elestio\.app|
91 grypstube\.uni-greifswald\.de|
103 kirche\.peertube-host\.de|
104 kiwi\.froggirl\.club|
109 la2\.peertube\.support|
110 la3\.peertube\.support|
111 la4\.peertube\.support|
113 lawsplaining\.peertube\.biz|
119 lucarne\.balsamine\.be|
122 media\.econoalchemist\.com|
126 media\.interior\.edu\.uy|
127 media\.krashboyz\.org|
130 media\.theplattform\.net|
131 media\.undeadnetwork\.de|
132 medias\.debrouillonet\.org|
133 medias\.pingbase\.net|
134 mediatube\.fermalo\.fr|
135 melsungen\.peertube-host\.de|
138 mirror\.peertube\.metalbanana\.net|
142 movies\.metricsmaster\.eu|
144 mytube\.kn-cloud\.de|
145 mytube\.le5emeaxe\.fr|
148 nanawel-peertube\.dyndns\.org|
152 nightshift\.minnix\.dev|
154 nyltube\.nylarea\.com|
155 ocfedtest\.hosted\.spacebear\.ee|
156 openmedia\.edunova\.it|
161 patriottube\.sonsofliberty\.red|
166 peer\.madiator\.cloud|
167 peer\.raise-uav\.com|
168 peershare\.togart\.de|
169 peertube-blablalinux\.be|
170 peertube-demo\.learning-hub\.fr|
171 peertube-docker\.cpy\.re|
172 peertube-eu\.howlround\.com|
173 peertube-u5014\.vm\.elestio\.app|
174 peertube-us\.howlround\.com|
179 peertube\.adjutor\.xyz|
180 peertube\.adresse\.data\.gouv\.fr|
181 peertube\.alpharius\.io|
182 peertube\.am-networks\.fr|
183 peertube\.anduin\.net|
184 peertube\.anti-logic\.com|
185 peertube\.arch-linux\.cz|
186 peertube\.art3mis\.de|
187 peertube\.artsrn\.ualberta\.ca|
188 peertube\.askan\.info|
189 peertube\.astral0pitek\.synology\.me|
190 peertube\.atsuchan\.page|
191 peertube\.automat\.click|
192 peertube\.b38\.rural-it\.org|
194 peertube\.beeldengeluid\.nl|
195 peertube\.bgzashtita\.es|
197 peertube\.bildung-ekhn\.de|
200 peertube\.bridaahost\.ynh\.fr|
201 peertube\.bubbletea\.dev|
202 peertube\.bubuit\.net|
203 peertube\.cabaal\.net|
204 peertube\.chatinbit\.com|
205 peertube\.chaunchy\.com|
207 peertube\.christianpacaud\.com|
208 peertube\.chtisurel\.net|
209 peertube\.chuggybumba\.com|
210 peertube\.cipherbliss\.com|
211 peertube\.cirkau\.art|
212 peertube\.cloud\.nerdraum\.de|
213 peertube\.cloud\.sans\.pub|
214 peertube\.coko\.foundation|
215 peertube\.communecter\.org|
216 peertube\.concordia\.social|
217 peertube\.corrigan\.xyz|
218 peertube\.cpge-brizeux\.fr|
219 peertube\.ctseuro\.com|
220 peertube\.cuatrolibertades\.org|
221 peertube\.cube4fun\.net|
222 peertube\.dair-institute\.org|
223 peertube\.davigge\.com|
224 peertube\.dc\.pini\.fr|
225 peertube\.deadtom\.me|
226 peertube\.debian\.social|
227 peertube\.delta0189\.xyz|
228 peertube\.demonix\.fr|
229 peertube\.designersethiques\.org|
233 peertube\.doesstuff\.social|
235 peertube\.education-forum\.com|
236 peertube\.elforcer\.ru|
237 peertube\.em\.id\.lv|
238 peertube\.ethibox\.fr|
240 peertube\.european-pirates\.eu|
242 peertube\.euskarabildua\.eus|
243 peertube\.expi\.studio|
244 peertube\.familie-berner\.de|
245 peertube\.familleboisteau\.fr|
246 peertube\.fedihost\.website|
247 peertube\.fenarinarsa\.com|
248 peertube\.festnoz\.de|
249 peertube\.forteza\.fr|
250 peertube\.freestorm\.online|
251 peertube\.functional\.cafe|
252 peertube\.gaminglinux\.fr|
253 peertube\.gargantia\.fr|
254 peertube\.geekgalaxy\.fr|
255 peertube\.gemlog\.ca|
257 peertube\.get-racing\.de|
258 peertube\.ghis94\.ovh|
259 peertube\.gidikroon\.eu|
260 peertube\.giftedmc\.com|
261 peertube\.grosist\.fr|
262 peertube\.gruntwerk\.org|
263 peertube\.gsugambit\.com|
264 peertube\.hackerfoo\.com|
265 peertube\.hellsite\.net|
266 peertube\.helvetet\.eu|
267 peertube\.histoirescrepues\.fr|
268 peertube\.home\.x0r\.fr|
269 peertube\.hyperfreedom\.org|
270 peertube\.ichigo\.everydayimshuflin\.com|
273 peertube\.inapurna\.org|
274 peertube\.informaction\.info|
275 peertube\.interhop\.org|
277 peertube\.it-arts\.net|
278 peertube\.jensdiemer\.de|
279 peertube\.johntheserg\.al|
280 peertube\.kaleidos\.net|
282 peertube\.kcore\.org|
283 peertube\.keazilla\.net|
284 peertube\.klaewyss\.fr|
286 peertube\.kodein\.be|
287 peertube\.kooperatywa\.tech|
288 peertube\.kriom\.net|
289 peertube\.kx\.studio|
290 peertube\.kyriog\.eu|
291 peertube\.la-famille-muller\.fr|
292 peertube\.labeuropereunion\.eu|
293 peertube\.lagvoid\.com|
294 peertube\.lhc\.net\.br|
295 peertube\.libresolutions\.network|
296 peertube\.libretic\.fr|
297 peertube\.librosphere\.fr|
298 peertube\.logilab\.fr|
300 peertube\.louisematic\.site|
301 peertube\.luckow\.org|
303 peertube\.lyceeconnecte\.fr|
304 peertube\.madixam\.xyz|
305 peertube\.magicstone\.dev|
306 peertube\.marienschule\.de|
308 peertube\.maxweiss\.io|
309 peertube\.miguelcr\.me|
310 peertube\.mikemestnik\.net|
311 peertube\.mobilsicher\.de|
312 peertube\.monlycee\.net|
313 peertube\.mxinfo\.fr|
315 peertube\.netzbegruenung\.de|
316 peertube\.nicolastissot\.fr|
317 peertube\.nogafam\.fr|
318 peertube\.normalgamingcommunity\.cz|
320 peertube\.offerman\.com|
321 peertube\.ohioskates\.com|
322 peertube\.onionstorm\.net|
323 peertube\.opencloud\.lu|
324 peertube\.otakufarms\.com|
325 peertube\.paladyn\.org|
326 peertube\.pix-n-chill\.fr|
327 peertube\.r2\.enst\.fr|
329 peertube\.redpill-insight\.com|
330 peertube\.researchinstitute\.at|
331 peertube\.revelin\.fr|
332 peertube\.rlp\.schule|
333 peertube\.rokugan\.fr|
334 peertube\.rougevertbleu\.tv|
335 peertube\.roundpond\.net|
336 peertube\.rural-it\.org|
337 peertube\.satoshishop\.de|
338 peertube\.scyldings\.com|
339 peertube\.securitymadein\.lu|
340 peertube\.semperpax\.com|
341 peertube\.semweb\.pro|
342 peertube\.sensin\.eu|
344 peertube\.skorpil\.cz|
345 peertube\.smertrios\.com|
346 peertube\.sqweeb\.net|
347 peertube\.stattzeitung\.org|
351 peertube\.takeko\.cyou|
352 peertube\.taxinachtegel\.de|
353 peertube\.teftera\.com|
354 peertube\.teutronic-services\.de|
355 peertube\.ti-fr\.com|
356 peertube\.tiennot\.net|
357 peertube\.tmp\.rcp\.tf|
358 peertube\.tspu\.edu\.ru|
361 peertube\.underworld\.fr|
362 peertube\.vapronva\.pw|
363 peertube\.veen\.world|
364 peertube\.vesdia\.eu|
365 peertube\.virtual-assembly\.org|
366 peertube\.viviers-fibre\.net|
368 peertube\.wiesbaden\.social|
369 peertube\.wivodaim\.net|
371 peertube\.wtfayla\.net|
373 peertube\.xwiki\.com|
375 peertube\.zetamc\.net|
376 peertube\.zmuuf\.org|
377 peertube\.zoz-serv\.org|
378 peertube\.zwindler\.fr|
380 periscope\.numenaute\.org|
382 petitlutinartube\.fr|
384 phoenixproject\.group|
389 player\.ojamajo\.moe|
391 portal\.digilab\.nfa\.cz|
392 private\.fedimovie\.com|
393 pt01\.lehrerfortbildung-bw\.de|
396 pt\.gordons\.gen\.nz|
397 pt\.ilyamikcoder\.com|
404 pt\.thishorsie\.rocks|
406 ptb\.lunarviews\.net|
408 ptube\.ranranhome\.info|
415 review\.peertube\.biz|
417 secure\.direct-live\.net|
418 secure\.scanovid\.com|
420 serv3\.wiki-tube\.de|
422 social\.fedimovie\.com|
425 special\.videovortex\.tv|
427 stl1988\.peertube-host\.de|
428 stream\.biovisata\.lt|
429 stream\.conesphere\.cloud|
431 stream\.jurnalfm\.md|
433 stream\.litera\.tools|
434 stream\.nuemedia\.se|
435 stream\.rlp-media\.de|
437 studios\.racer159\.com|
438 styxhexenhammer666\.com|
439 syrteplay\.obspm\.fr|
441 tbh\.co-shaoghal\.net|
443 testube\.distrilab\.fr|
444 tgi\.hosted\.spacebear\.ee|
445 theater\.ethernia\.net|
451 trailers\.ddigest\.com|
452 tube-action-educative\.apps\.education\.fr|
453 tube-arts-lettres-sciences-humaines\.apps\.education\.fr|
454 tube-cycle-2\.apps\.education\.fr|
455 tube-cycle-3\.apps\.education\.fr|
456 tube-education-physique-et-sportive\.apps\.education\.fr|
457 tube-enseignement-professionnel\.apps\.education\.fr|
458 tube-institutionnel\.apps\.education\.fr|
459 tube-langues-vivantes\.apps\.education\.fr|
460 tube-maternelle\.apps\.education\.fr|
461 tube-numerique-educatif\.apps\.education\.fr|
462 tube-sciences-technologies\.apps\.education\.fr|
463 tube-test\.apps\.education\.fr|
464 tube1\.perron-service\.de|
466 tube\.abolivier\.bzh|
469 tube\.area404\.cloud|
472 tube\.awkward\.company|
475 tube\.bartrip\.me\.uk|
476 tube\.belowtoxic\.media|
478 tube\.bit-friends\.de|
484 tube\.cybershock\.life|
486 tube\.dev\.displ\.eu|
487 tube\.digitalesozialearbeit\.de|
489 tube\.doortofreedom\.org|
490 tube\.dsocialize\.net|
494 tube\.erzbistum-hamburg\.de|
502 tube\.freepeople\.fr|
512 tube\.ghk-academy\.info|
519 tube\.interhacker\.space|
530 tube\.lacaveatonton\.ovh|
531 tube\.laurent-malys\.fr|
532 tube\.leetdreams\.ch|
535 tube\.lucie-philou\.com|
536 tube\.media-techport\.de|
540 tube\.network\.europa\.eu|
542 tube\.nieuwwestbrabant\.nl|
546 tube\.nuagelibre\.fr|
547 tube\.numerique\.gouv\.fr|
553 tube\.onlinekirche\.net|
554 tube\.opportunis\.me|
555 tube\.oraclefilms\.com|
561 tube\.pilgerweg-21\.de|
564 tube\.ponsonaille\.fr|
565 tube\.portes-imaginaire\.org|
566 tube\.public\.apolut\.net|
569 tube\.querdenken-711\.de|
570 tube\.rebellion\.global|
571 tube\.reseau-canope\.fr|
572 tube\.rhythms-of-resistance\.org|
577 tube\.schleuss\.online|
578 tube\.schule\.social|
579 tube\.sekretaerbaer\.net|
583 tube\.sleeping\.town|
586 tube\.systerserver\.net|
590 tube\.thierrytalbert\.fr|
591 tube\.tinfoil-hat\.net|
595 tube\.troopers\.agency|
598 tube\.tylerdavis\.xyz|
605 tube\.xn--baw-joa\.social|
609 tubulus\.openlatin\.org|
617 tv\.farewellutopia\.com|
618 tv\.filmfreedom\.net|
622 tv\.pirateradio\.social|
624 tv\.santic-zombie\.ru|
628 twctube\.twc-zone\.eu|
646 vid\.nocogabriel\.fr|
648 vid\.northbound\.online|
650 vid\.plantplotting\.co\.uk|
652 vid\.prometheus\.systems|
659 video\.1146\.nohost\.me|
662 video\.ados\.accoord\.fr|
663 video\.amiga-ng\.org|
664 video\.anartist\.org|
665 video\.asgardius\.company|
666 video\.audiovisuel-participatif\.org|
667 video\.bards\.online|
668 video\.barkoczy\.social|
670 video\.beyondwatts\.social|
671 video\.bgeneric\.net|
672 video\.bilecik\.edu\.tr|
673 video\.blast-info\.fr|
676 video\.causa-arcana\.com|
677 video\.chasmcity\.net|
679 video\.cigliola\.com|
681 video\.clumsy\.computer|
682 video\.cnnumerique\.fr|
686 video\.comune\.trento\.it|
690 video\.davejansen\.com|
691 video\.dlearning\.nl|
693 video\.dresden\.network|
697 video\.ellijaymakerspace\.org|
698 video\.emergeheart\.info|
699 video\.eradicatinglove\.xyz|
700 video\.everythingbagel\.me|
701 video\.extremelycorporate\.ca|
702 video\.fabiomanganiello\.com|
705 video\.firehawk-systems\.com|
706 video\.fox-romka\.ru|
708 video\.glassbeadcollective\.org|
709 video\.graine-pdl\.org|
712 video\.hardlimit\.com|
715 video\.infojournal\.fr|
716 video\.internet-czas-dzialac\.pl|
719 video\.ironsysadmin\.com|
720 video\.islameye\.com|
723 video\.jeffmcbride\.net|
724 video\.jigmedatse\.com|
725 video\.kuba-orlik\.name|
726 video\.lacalligramme\.fr|
727 video\.lanceurs-alerte\.fr|
729 video\.lapineige\.fr|
730 video\.laraffinerie\.re|
734 video\.licentia\.net|
735 video\.linc\.systems|
737 video\.linuxtrent\.it|
738 video\.liveitlive\.show|
743 video\.lycee-experimental\.org|
744 video\.maechler\.cloud|
745 video\.marcorennmaus\.de|
746 video\.mass-trespass\.uk|
747 video\.matomocamp\.org|
748 video\.medienzentrum-harburg\.de|
749 video\.mentality\.rip|
750 video\.metaversum\.wtf|
751 video\.midreality\.com|
760 video\.off-investigation\.fr|
762 video\.ordinobsolete\.fr|
764 video\.ourcommon\.cloud|
765 video\.ozgurkon\.org|
770 video\.publicspaces\.net|
771 video\.pullopen\.xyz|
773 video\.rainevixen\.com|
774 video\.resolutions\.it|
775 video\.retroedge\.tech|
777 video\.rlp-media\.de|
778 video\.rs-einrich\.de|
782 video\.shitposter\.club|
783 video\.simplex-software\.ru|
786 video\.software-fuer-engagierte\.de|
790 video\.taskcards\.eu|
791 video\.team-lcbs\.eu|
792 video\.techforgood\.social|
793 video\.telemillevaches\.net|
794 video\.thepolarbear\.co\.uk|
795 video\.thinkof\.name|
798 video\.trankil\.info|
802 video\.uriopss-pdl\.fr|
805 video\.vaku\.org\.ua|
806 video\.vegafjord\.me|
808 video\.violoncello\.ch|
809 video\.voidconspiracy\.band|
811 video\.windfluechter\.org|
813 videos-passages\.huma-num\.fr|
815 videos\.ahp-numerique\.fr|
816 videos\.alamaisondulibre\.org|
817 videos\.archigny\.net|
818 videos\.aroaduntraveled\.com|
820 videos\.benjaminbrady\.ie|
821 videos\.bik\.opencloud\.lu|
822 videos\.cloudron\.io|
823 videos\.codingotaku\.com|
824 videos\.coletivos\.org|
825 videos\.collate\.social|
826 videos\.danksquad\.org|
827 videos\.digitaldragons\.eu|
828 videos\.dromeadhere\.fr|
829 videos\.explain-it\.org|
830 videos\.factsonthegroundshow\.com|
833 videos\.gamercast\.net|
834 videos\.gianmarco\.gg|
835 videos\.globenet\.org|
839 videos\.hyphalfusion\.network|
841 videos\.im\.allmendenetz\.de|
842 videos\.jacksonchen666\.com|
843 videos\.john-livingston\.fr|
844 videos\.knazarov\.com|
845 videos\.kuoushi\.com|
846 videos\.laliguepaysdelaloire\.org|
847 videos\.lemouvementassociatif-pdl\.org|
848 videos\.leslionsfloorball\.fr|
849 videos\.librescrum\.org|
850 videos\.mastodont\.cat|
853 videos\.offroad\.town|
854 videos\.openmandriva\.org|
855 videos\.parleur\.net|
857 videos\.pop\.eu\.com|
859 videos\.rauten\.co\.za|
861 videos\.sarcasmstardust\.com|
862 videos\.scanlines\.xyz|
864 videos\.stadtfabrikanten\.org|
865 videos\.supertuxkart\.net|
866 videos\.testimonia\.org|
867 videos\.thinkerview\.com|
868 videos\.torrenezzi10\.xyz|
870 videos\.utsukta\.org|
871 videos\.viorsan\.com|
872 videos\.wherelinux\.xyz|
873 videos\.wikilibriste\.fr|
875 videos\.yeswiki\.net|
876 videotube\.duckdns\.org|
883 virtual-girls-are\.definitely-for\.me|
889 vtr\.chikichiki\.tube|
890 vulgarisation-informatique\.fr|
891 watch\.easya\.solutions|
892 watch\.goodluckgabe\.life|
893 watch\.ignorance\.eu|
894 watch\.jimmydore\.com|
895 watch\.libertaria\.space|
896 watch\.nuked\.social|
898 watch\.thelema\.social|
899 watch\.tubelab\.video|
901 webtv\.vandoeuvre\.net|
905 wow\.such\.disappointment\.fail|
912 www\.rocaguinarda\.tv|
914 xxivproduction\.video|
916 ytube\.retronerd\.at|
920 peertube\.rainbowswingers\.net|
924 videomensoif\.ynh\.fr|
925 peertube\.travelpandas\.eu|
926 peertube\.rachetjay\.fr|
927 peertube\.montecsys\.fr|
930 peertube\.umeahackerspace\.se|
932 video\.monsieurbidouille\.fr|
933 tube\.openalgeria\.org|
935 video\.anormallostpod\.ovh|
936 tube\.crapaud-fou\.org|
940 peertube\.snargol\.com|
945 peertube\.osureplayviewer\.xyz|
946 peertube\.mathieufamily\.ovh|
947 www\.videos-libr\.es|
949 peertube\.fediverse\.ru|
950 peertube\.oiseauroch\.fr|
958 peertube\.chantierlibre\.org|
964 videos\.elbinario\.net|
970 peertube\.gnumeria\.eu\.org|
974 tube\.kalah-france\.org|
978 peertube\.hatthieves\.es|
979 video\.fitchfamily\.org|
983 tube\.22decembre\.eu|
984 peertube\.harmoniescreatives\.com|
986 video\.thedwyers\.co|
987 video\.bruitbruit\.com|
988 peertube\.foxfam\.club|
990 videos\.bugs\.social|
991 peertube\.malbert\.xyz|
992 peertube\.bilange\.ca|
995 peertube\.fedilab\.app|
997 video\.mstddntfdn\.online|
999 peertube\.sl-network\.fr|
1000 peertube\.dynlinux\.io|
1001 peertube\.david\.durieux\.family|
1002 peertube\.linuxrocks\.online|
1004 v\.kretschmann\.social|
1007 tube\.dragonpsi\.xyz|
1008 peertube\.boneheadmedia\.com|
1009 videos\.funkwhale\.audio|
1011 peertube\.gcaillaut\.fr|
1018 peertube\.simounet\.net|
1019 play\.jergefelt\.se|
1020 peertube\.zeteo\.me|
1022 peertube\.kerenon\.com|
1024 tube\.calculate\.social|
1025 peertube\.mckillop\.org|
1026 tube\.netzspielplatz\.de|
1030 peertube\.stephenson\.cc|
1031 bistule\.nohost\.me|
1032 peertube\.kajalinifi\.de|
1034 video\.omniatv\.com|
1035 peertube\.ffs2play\.fr|
1036 peertube\.leboulaire\.ovh|
1037 peertube\.tronic-studio\.com|
1038 peertube\.public\.cat|
1039 peertube\.metalbanana\.net|
1040 video\.1000i100\.fr|
1041 peertube\.alter-nativ-voll\.de|
1043 tube\.worldofhauru\.xyz|
1045 peertube\.teleassist\.fr|
1046 videos\.mleduc\.xyz|
1048 media\.privacyinternational\.org|
1050 video\.halle-leaks\.de|
1051 video\.grosskopfgames\.de|
1052 peertube\.schaeferit\.de|
1053 peertube\.jackbot\.fr|
1054 tube\.extinctionrebellion\.fr|
1055 peertube\.f-si\.org|
1058 peertube\.zergy\.net|
1059 peertube\.roflcopter\.fr|
1060 peertube\.floss-marketing-school\.com|
1062 peertube\.iriseden\.eu|
1063 videos\.ubuntu-paris\.org|
1064 peertube\.mastodon\.host|
1066 peertube\.s2s\.video|
1068 tube\.open-plug\.eu|
1071 peertube\.normandie-libre\.fr|
1072 peertube\.slat\.org|
1073 video\.lacaveatonton\.ovh|
1075 peertube\.servebeer\.com|
1076 peertube\.fedi\.quebec|
1079 peertube\.eric\.ovh|
1081 tube\.unmondemeilleur\.eu|
1083 video\.antirep\.net|
1088 video\.devinberg\.com|
1090 peertube\.kosebamse\.com|
1091 yunopeertube\.myddns\.me|
1092 peertube\.varney\.fr|
1093 peertube\.anon-kenkai\.com|
1096 videos\.dinofly\.com|
1100 video\.heromuster\.com|
1101 video\.lemediatv\.fr|
1106 pt\.laurentkruger\.fr|
1107 video\.monarch-pass\.net|
1108 peertube\.artica\.center|
1109 video\.alternanet\.fr|
1111 fanvid\.stopthatimp\.net|
1116 peertube\.mablr\.org|
1120 devtube\.dev-wiki\.de|
1121 raptube\.antipub\.org|
1123 peertube\.mygaia\.org|
1125 peertube\.livingutopia\.org|
1126 peertube\.the-penguin\.de|
1127 tube\.thechangebook\.org|
1131 mplayer\.demouliere\.eu|
1134 peertube\.zapashcanon\.fr|
1135 video\.latavernedejohnjohn\.fr|
1136 peertube\.pcservice46\.fr|
1137 peertube\.mazzonetto\.eu|
1138 video\.irem\.univ-paris-diderot\.fr|
1139 video\.livecchi\.cloud|
1142 video\.cabane-libre\.org|
1143 peertube\.openstreetmap\.fr|
1144 videos\.alolise\.org|
1146 video\.antopie\.org|
1150 peertube\.freeforge\.eu|
1151 video\.arbitrarion\.com|
1152 video\.datsemultimedia\.com|
1154 peertube\.ricostrongxxx\.com|
1155 docker\.videos\.lecygnenoir\.info|
1156 peertube\.togart\.de|
1157 tube\.postblue\.info|
1158 videos\.domainepublic\.net|
1159 peertube\.cyber-tribal\.com|
1160 video\.gresille\.org|
1161 peertube\.dsmouse\.net|
1162 cinema\.yunohost\.support|
1163 tube\.theocevaer\.fr|
1167 peertube\.metawurst\.space|
1168 videos\.wakapo\.com|
1170 video\.freeradical\.zone|
1173 pt\.kircheneuenburg\.de|
1174 peertube\.asrun\.eu|
1175 peertube\.lagob\.fr|
1176 videos\.side-ways\.net|
1179 video\.taboulisme\.com|
1183 video\.monsieur-a\.fr|
1184 peertube\.librelois\.fr|
1185 videos\.pair2jeux\.tube|
1186 videos\.pueseso\.club|
1187 peer\.mathdacloud\.ovh|
1188 media\.assassinate-you\.net|
1190 ptube\.rousset\.nom\.fr|
1193 video\.iphodase\.fr|
1194 peertube\.makotoworkshop\.org|
1195 peertube\.serveur\.slv-valbonne\.fr|
1198 videos\.hack2g2\.fr|
1200 pire\.artisanlogiciel\.net|
1201 videos\.numerique-en-commun\.fr|
1202 video\.netsyms\.com|
1203 video\.die-partei\.social|
1204 video\.writeas\.org|
1205 peertube\.swarm\.solvingmaz\.es|
1206 tube\.pericoloso\.ovh|
1207 watching\.cypherpunk\.observer|
1208 videos\.adhocmusic\.com|
1210 peertube\.librelabucm\.org|
1211 videos\.numericoop\.fr|
1212 peertube\.koehn\.com|
1213 peertube\.anarchmusicall\.net|
1214 tube\.kampftoast\.de|
1216 peertube\.xtenz\.xyz|
1219 peertube\.nomagic\.uk|
1221 videos\.koumoul\.com|
1222 video\.rastapuls\.com|
1223 video\.mantlepro\.com|
1224 video\.deadsuperhero\.com|
1225 peertube\.musicstudio\.pro|
1226 peertube\.we-keys\.fr|
1227 artitube\.artifaille\.fr|
1228 peertube\.ethernia\.net|
1232 peertube\.donnadieu\.fr|
1233 argos\.aquilenet\.fr|
1236 videos\.darckoune\.moe|
1237 tube\.traydent\.info|
1238 dev\.videos\.lecygnenoir\.info|
1239 peertube\.nayya\.org|
1241 peertube\.mofgao\.space|
1242 video\.lequerrec\.eu|
1243 peertube\.amicale\.net|
1250 choob\.h\.etbus\.ch|
1252 peertube\.heberge\.fr|
1254 videos\.cloudfrancois\.fr|
1258 video\.blender\.org|
1263 videos\.lescommuns\.org|
1267 peertube\.nogafa\.org|
1268 megatube\.lilomoino\.fr|
1269 peertube\.tamanoir\.foucry\.net|
1270 peertube\.devosi\.org|
1271 peertube\.1312\.media|
1272 tube\.bootlicker\.party|
1274 video\.blueline\.mg|
1275 tube\.homecomputing\.fr|
1276 tube\.ouahpiti\.info|
1277 video\.tedomum\.net|
1280 peertube\.gaialabs\.ch|
1283 video\.migennes\.net|
1286 videos\.iut-orsay\.fr|
1287 peertube\.solidev\.net|
1289 video\.passageenseine\.fr|
1290 videos\.festivalparminous\.org|
1291 peertube\.touhoppai\.moe|
1293 peer\.hostux\.social|
1295 peertube\.walkingmountains\.fr|
1297 peertube\.parleur\.net|
1298 peertube\.heraut\.eu|
1299 tube\.aquilenet\.fr|
1300 peertube\.gegeweb\.eu|
1303 tube\.conferences-gesticulees\.net|
1304 peertube\.datagueule\.tv|
1306 tube\.mochi\.academy|
1308 video\.colibris-outilslibres\.org|
1317 _UUID_RE
= r
'[\da-zA-Z]{22}|[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}'
1318 _API_BASE
= 'https://%s/api/v1/videos/%s/%s'
1319 _VALID_URL
= r
'''(?x)
1321 peertube:(?P<host>[^:]+):|
1322 https?://(?P<host_2>%s)/(?:videos/(?:watch|embed)|api/v\d/videos|w)/
1325 ''' % (_INSTANCES_RE
, _UUID_RE
)
1326 _EMBED_REGEX
= [r
'''(?x)<iframe[^>]+\bsrc=["\'](?P
<url
>(?
:https?
:)?
//{_INSTANCES_RE}
/videos
/embed
/{cls
._UUID
_RE
})''']
1328 'url': 'https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d',
1329 'md5': '8563064d245a4be5705bddb22bb00a28',
1331 'id': '9c9de5e8-0a1e-484a-b099-e80766180a6d',
1333 'title': 'What is PeerTube?',
1334 'description': 'md5:3fefb8dde2b189186ce0719fda6f7b10',
1335 'thumbnail': r're:https?://.*\.(?:jpg|png)',
1336 'timestamp': 1538391166,
1337 'upload_date': '20181001',
1338 'uploader': 'Framasoft',
1340 'uploader_url': 'https://framatube.org/accounts/framasoft',
1341 'channel': 'A propos de PeerTube',
1342 'channel_id': '2215',
1343 'channel_url': 'https://framatube.org/video-channels/joinpeertube',
1345 'license': 'Attribution - Share Alike',
1349 'dislike_count': int,
1350 'tags': ['framasoft', 'peertube'],
1351 'categories': ['Science & Technology'],
1354 'url': 'https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e',
1356 'id': '122d093a-1ede-43bd-bd34-59d2931ffc5e',
1358 'title': 'E2E tests',
1359 'uploader_id': '37855',
1360 'timestamp': 1589276219,
1361 'upload_date': '20200512',
1362 'uploader': 'chocobozzz',
1365 'url': 'https://peertube2.cpy.re/w/3fbif9S3WmtTP8gGsC5HBd',
1367 'id': '3fbif9S3WmtTP8gGsC5HBd',
1369 'title': 'E2E tests',
1370 'uploader_id': '37855',
1371 'timestamp': 1589276219,
1372 'upload_date': '20200512',
1373 'uploader': 'chocobozzz',
1376 'url': 'https://peertube2.cpy.re/api/v1/videos/3fbif9S3WmtTP8gGsC5HBd',
1378 'id': '3fbif9S3WmtTP8gGsC5HBd',
1380 'title': 'E2E tests',
1381 'uploader_id': '37855',
1382 'timestamp': 1589276219,
1383 'upload_date': '20200512',
1384 'uploader': 'chocobozzz',
1388 'url': 'peertube:spacepub.space:d8943b2d-8280-497b-85ec-bc282ec2afdc',
1390 'id': 'd8943b2d-8280-497b-85ec-bc282ec2afdc',
1392 'title': 'Dot matrix printer shell demo',
1394 'timestamp': 1587401293,
1395 'upload_date': '20200420',
1396 'uploader': 'Drew DeVault',
1399 'url': 'https://peertube.debian.social/videos/watch/0b04f13d-1e18-4f1d-814e-4979aa7c9c44',
1400 'only_matching': True,
1403 'url': 'https://vod.ksite.de/videos/watch/9bb88cd3-9959-46d9-9ab9-33d2bb704c39',
1404 'only_matching': True,
1406 'url': 'https://vod.ksite.de/videos/embed/fed67262-6edb-4d1c-833b-daa9085c71d7',
1407 'only_matching': True,
1409 'url': 'https://peertube.tv/api/v1/videos/c1875674-97d0-4c94-a058-3f7e64c962e8',
1410 'only_matching': True,
1412 'url': 'peertube:framatube.org:b37a5b9f-e6b5-415c-b700-04a5cd6ec205',
1413 'only_matching': True,
1417 def _extract_peertube_url(webpage, source_url):
1419 r'https?://(?P<host>[^/]+)/(?:videos/(?:watch|embed)|w)/(?P<id>%s)'
1420 % PeerTubeIE._UUID_RE, source_url)
1421 if mobj and any(p in webpage for p in (
1422 'meta property="og:platform" content="PeerTube"',
1424 'There will be other non JS-based clients to access PeerTube',
1425 '>We are sorry but it seems that PeerTube is not compatible with your web browser.<')):
1426 return 'peertube:%s:%s' % mobj.group('host', 'id')
1429 def _extract_embed_urls(cls, url, webpage):
1430 embeds = tuple(super()._extract_embed_urls(url, webpage))
1434 peertube_url = cls._extract_peertube_url(webpage, url)
1436 return [peertube_url]
1438 def _call_api(self, host, video_id, path, note=None, errnote=None, fatal=True):
1439 return self._download_json(
1440 self._API_BASE % (host, video_id, path), video_id,
1441 note=note, errnote=errnote, fatal=fatal)
1443 def _get_subtitles(self, host, video_id):
1444 captions = self._call_api(
1445 host, video_id, 'captions', note='Downloading captions JSON',
1447 if not isinstance(captions, dict):
1449 data = captions.get('data')
1450 if not isinstance(data, list):
1454 language_id = try_get(e, lambda x: x['language']['id'], compat_str)
1455 caption_url = urljoin('https://%s' % host, e.get('captionPath'))
1458 subtitles.setdefault(language_id or 'en', []).append({
1463 def _real_extract(self, url):
1464 mobj = self._match_valid_url(url)
1465 host = mobj.group('host') or mobj.group('host_2')
1466 video_id = mobj.group('id')
1468 video = self._call_api(
1469 host, video_id, '', note='Downloading video JSON')
1471 title = video['name']
1474 files = video.get('files') or []
1475 for playlist in (video.get('streamingPlaylists') or []):
1476 if not isinstance(playlist, dict):
1478 playlist_files = playlist.get('files')
1479 if not (playlist_files and isinstance(playlist_files, list)):
1481 files.extend(playlist_files)
1483 if not isinstance(file_, dict):
1485 file_url = url_or_none(file_.get('fileUrl'))
1488 file_size = int_or_none(file_.get('size'))
1489 format_id = try_get(
1490 file_, lambda x: x['resolution']['label'], compat_str)
1491 f = parse_resolution(format_id)
1494 'format_id': format_id,
1495 'filesize': file_size,
1497 if format_id == '0p':
1498 f['vcodec'] = 'none'
1500 f['fps'] = int_or_none(file_.get('fps'))
1503 description = video.get('description')
1504 if description and len(description) >= 250:
1505 # description is shortened
1506 full_description = self._call_api(
1507 host, video_id, 'description', note='Downloading description JSON',
1510 if isinstance(full_description, dict):
1511 description = str_or_none(full_description.get('description')) or description
1513 subtitles = self.extract_subtitles(host, video_id)
1515 def data(section, field, type_):
1516 return try_get(video, lambda x: x[section][field], type_)
1518 def account_data(field, type_):
1519 return data('account', field, type_)
1521 def channel_data(field, type_):
1522 return data('channel', field, type_)
1524 category = data('category', 'label', compat_str)
1525 categories = [category] if category else None
1527 nsfw = video.get('nsfw')
1529 age_limit = 18 if nsfw else 0
1533 webpage_url = 'https://%s/videos/watch/%s' % (host, video_id)
1538 'description': description,
1539 'thumbnail': urljoin(webpage_url, video.get('thumbnailPath')),
1540 'timestamp': unified_timestamp(video.get('publishedAt')),
1541 'uploader': account_data('displayName', compat_str),
1542 'uploader_id': str_or_none(account_data('id', int)),
1543 'uploader_url': url_or_none(account_data('url', compat_str)),
1544 'channel': channel_data('displayName', compat_str),
1545 'channel_id': str_or_none(channel_data('id', int)),
1546 'channel_url': url_or_none(channel_data('url', compat_str)),
1547 'language': data('language', 'id', compat_str),
1548 'license': data('licence', 'label', compat_str),
1549 'duration': int_or_none(video.get('duration')),
1550 'view_count': int_or_none(video.get('views')),
1551 'like_count': int_or_none(video.get('likes')),
1552 'dislike_count': int_or_none(video.get('dislikes')),
1553 'age_limit': age_limit,
1554 'tags': try_get(video, lambda x: x['tags'], list),
1555 'categories': categories,
1557 'subtitles': subtitles,
1558 'webpage_url': webpage_url,
1562 class PeerTubePlaylistIE(InfoExtractor):
1563 IE_NAME = 'PeerTube:Playlist'
1566 'c': 'video-channels',
1567 'w/p': 'video-playlists',
1569 _VALID_URL = r'''(?x
)
1570 https?
://(?P
<host
>%s)/(?P
<type>(?
:%s))/
1572 ''' % (PeerTubeIE._INSTANCES_RE, '|'.join(_TYPES.keys()))
1574 'url': 'https://peertube.debian.social/w/p/hFdJoTuyhNJVa1cDWd1d12',
1576 'id': 'hFdJoTuyhNJVa1cDWd1d12',
1577 'description': 'Diversas palestras do Richard Stallman no Brasil.',
1578 'title': 'Richard Stallman no Brasil',
1579 'timestamp': 1599676222,
1581 'playlist_mincount': 9,
1583 'url': 'https://peertube2.cpy.re/a/chocobozzz/videos',
1586 'timestamp': 1553874564,
1587 'title': 'chocobozzz',
1589 'playlist_mincount': 2,
1591 'url': 'https://framatube.org/c/bf54d359-cfad-4935-9d45-9d6be93f63e8/videos',
1593 'id': 'bf54d359-cfad-4935-9d45-9d6be93f63e8',
1594 'timestamp': 1519917377,
1595 'title': 'Les vidéos de Framasoft',
1597 'playlist_mincount': 345,
1599 'url': 'https://peertube2.cpy.re/c/blender_open_movies@video.blender.org/videos',
1601 'id': 'blender_open_movies@video.blender.org',
1602 'timestamp': 1542287810,
1603 'title': 'Official Blender Open Movies',
1605 'playlist_mincount': 11,
1607 _API_BASE = 'https://%s/api/v1/%s/%s%s'
1610 def call_api(self, host, name, path, base, **kwargs):
1611 return self._download_json(
1612 self._API_BASE % (host, base, name, path), name, **kwargs)
1614 def fetch_page(self, host, id, type, page):
1616 video_data = self.call_api(
1618 f'/videos?sort=-createdAt&start={self._PAGE_SIZE * (page - 1)}&count={self._PAGE_SIZE}&nsfw=both',
1619 type, note=f'Downloading page {page}').get('data', [])
1620 for video in video_data:
1621 shortUUID = video.get('shortUUID') or try_get(video, lambda x: x['video']['shortUUID'])
1622 video_title = video.get('name') or try_get(video, lambda x: x['video']['name'])
1623 yield self.url_result(
1624 f'https://{host}/w/{shortUUID}', PeerTubeIE.ie_key(),
1625 video_id=shortUUID, video_title=video_title)
1627 def _extract_playlist(self, host, type, id):
1628 info = self.call_api(host, id, '', type, note='Downloading playlist information', fatal=False)
1630 playlist_title = info.get('displayName')
1631 playlist_description = info.get('description')
1632 playlist_timestamp = unified_timestamp(info.get('createdAt'))
1633 channel = try_get(info, lambda x: x['ownerAccount']['name']) or info.get('displayName')
1634 channel_id = try_get(info, lambda x: x['ownerAccount']['id']) or info.get('id')
1635 thumbnail = format_field(info, 'thumbnailPath', f'https://{host}%s')
1637 entries = OnDemandPagedList(functools.partial(
1638 self.fetch_page, host, id, type), self._PAGE_SIZE)
1640 return self.playlist_result(
1641 entries, id, playlist_title, playlist_description,
1642 timestamp=playlist_timestamp, channel=channel, channel_id=channel_id, thumbnail=thumbnail)
1644 def _real_extract(self, url):
1645 type, host, id = self._match_valid_url(url).group('type', 'host', 'id')
1646 type = self._TYPES[type]
1647 return self._extract_playlist(host, type, id)