
    V|h"                     N   S SK r S SKrSSKJr  SSKJr  SSKJrJrJ	r	J
r
JrJrJrJr   " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r  " S+ S,\5      r! " S- S.\5      r" " S/ S0\5      r# " S1 S2\"5      r$ " S3 S4\"5      r%g)5    N   )InfoExtractor   )	HTTPError)ExtractorErrordetermine_extfloat_or_noneint_or_noneremove_startstrip_or_nonetry_getunified_timestampc                   B    \ rS rSrSr0 rS
S jrS rS rS r	SS jr
Srg	)DPlayBaseIE   z/(?P<id>[^/]+/[^/?#]+)c                    X4nU R                  U5      R                  S5      nU=(       a    UR                  =(       d    U R                  R                  U5      nU(       d~  SU0nU(       a"  [        R
                  " 5       R                  US'   U R                  US-   USUS9S   S   S   nU R                  U5      R                  S5      (       d  XpR                  U'   S	U 3$ )
NstrealmdeviceIdtokenzDownloading token)querydata
attributeszBearer )_get_cookiesgetvalue_auth_token_cacheuuiduuid4hex_download_json)	self
disco_base
display_idr   needs_device_idkeyr   r   r   s	            P/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/dplay.py	_get_authDPlayBaseIE._get_auth   s    !z*..t4DT%;%;%?%?%De$E$(JJL$4$4j!''W$j2E ( #%%133:<E
 $$Z044T::.3&&s+      c                 ,   U R                  UR                  R                  R                  5       R	                  S5      S 5      nUS   S   nUR                  S5      nUS:X  a  U R                  US9  OUS;   a
  [        SS	S
9e[        US   S   S   S	S
9e)Nzutf-8errorsr   codezaccess.denied.geoblocked)	countries)zaccess.denied.missingpackagezinvalid.tokenzQThis video is only available for registered users. You may want to use --cookies.T)expecteddetail)_parse_jsoncauseresponsereaddecoder   raise_geo_restrictedr   )r"   egeo_countriesinfoerror
error_codes         r'   _process_errorsDPlayBaseIE._process_errors)   s     0 0 5 5 7 > >w GNXq!YYv&
33%%%>LL cnrt tT(^A.x84HHr*   c                 0    U R                  X#US5      US'   g )NFAuthorization)r(   r"   headersr#   r$   r   s        r'   _update_disco_api_headers%DPlayBaseIE._update_disco_api_headers4   s    #'>>*%QV#W r*   c                     U R                  US-   U-   X#S9S   S   S   n/ nUR                  5        H(  u  pgUR                  UUR                  S5      S.5        M*     U$ )Nzplayback/videoPlaybackInfo/)rA   r   r   	streamingurl)typerF   )r!   itemsappendr   )r"   r#   video_idrA   rE   streaming_list	format_idformat_dicts           r'   _download_video_playback_info)DPlayBaseIE._download_video_playback_info7   s    ''66A ( ''-//;==HJ	 &/oo&7"I!!!"u-#  '8
 r*   c                 L   U R                  S5      =(       d    UnUR                  5       /nU R                  SU05        SU S3nSU0n	U R                  XX$5         U R	                  US-   U-   UU	SSSSS	S
S.S9n
U
S   S   nU
S   S   nUS   R                  5       n/ n0 n U R                  XU	5      nU H  n[        U[        5      (       d  M  UR                  S5      nU(       d  M4  UR                  S5      n[        U5      nUS:X  d  US:X  a:  U R!                  UUSSS9u  nnUR#                  U5        U R%                  UU5      nM  US:X  d  US:X  a<  U R'                  UUSSSSS9u  nnUR#                  U5        U R%                  UU5      nM  UR)                  UUS.5        M     S =nn/ n/ nU
R                  S5      =(       d    / n[        U[*        5      (       a  U H  nUR                  S5      nU(       d  M  UR                  S5      n U S:X  a  UR                  S5      nOcU S :X  a]  UR                  S!5      n!U!(       aE  UR)                  U![-        UR                  S"5      5      [-        UR                  S#5      5      S$.5        U S%:X  a  UR                  S5      nM  U S&:X  d  M  UR                  S5      n"U"(       d  M  UR)                  U"5        M     UUU[/        UR                  S'5      5      [1        UR                  S(5      S)5      [3        UR                  S*5      5      U[-        UR                  S+5      5      [-        UR                  S,5      5      UUUUUS-U0S..$ ! [
         aP  n[        UR                  [        5      (       a+  UR                  R                  S:X  a  U R                  X5        e S nAff = f! [
         aP  n[        UR                  [        5      (       a+  UR                  R                  S:X  a  U R                  X5        e S nAff = f)/Ngeo_bypass_countryr.   zhttps:///Refererzcontent/videos/namezheight,src,widthzFdescription,episodeNumber,name,publishStart,seasonNumber,videoDurationzimages,primaryChannel,show,tags)zfields[channel]zfields[image]zfields[show]zfields[tag]zfields[video]include)rA   r   i  r   idr   i  rF   rG   dashmpdF)mpd_idfatalhlsm3u8mp4m3u8_native)entry_protocolm3u8_idrZ   )rF   rL   includedchannelimagesrcwidthheight)rF   re   rf   showtagdescriptionvideoDurationi  publishStartseasonNumberepisodeNumberreferer)rV   r$   titleri   duration	timestampseriesseason_numberepisode_numbercreatortags
thumbnailsformats	subtitleshttp_headers)	get_paramupper_initialize_geo_bypassrB   r!   r   
isinstancer2   r   statusr<   striprN   dictr   r   "_extract_mpd_formats_and_subtitlesextend_merge_subtitles#_extract_m3u8_formats_and_subtitlesrI   listr
   r   r	   r   )#r"   rF   r$   
disco_hostr   countrydomainr8   r#   rA   videor7   rJ   r9   ro   rx   ry   rE   rM   
format_urlrL   ext	dash_fmts	dash_subs	m3u8_fmts	m3u8_subsru   rr   rv   rw   ra   r   e_typerd   rT   s#                                      r'   _get_disco_api_infoDPlayBaseIE._get_disco_api_infoC   s   ..!56A' )##%
 	  
|1-
s
 	&&wJN	''..;Z'-%7$*#)%m@( ( 	E =&V}\*V""$		::g/I %Kk400$/J#/I
+CF"cUl'+'N'N
6 (O (H$	9y) 11)YG	e#sf}'+'O'O
E#0% (P (!$	9 y) 11)YG	%!*  + %4  &
99Z(.Bh%%UU<0
!vY&(nnV4Gw&$../C"))#&%01H%I&1*..2J&K+ 
 V#'^^F3Fu_%>>&1DtD)) , $(-)@A%dhh&?F*488N+CD(.)AB)$((?*CD$"6
 	
I  	!''9--!''..C2G$$Q6	  	!''9--!''..C2G$$Q6	s2   M, #O	 ,
O6AOO	
P#APP# N)T) )__name__
__module____qualname____firstlineno___PATH_REGEXr   r(   r<   rB   rN   r   __static_attributes__r   r*   r'   r   r      s)    +K!&	IX
l
r*   r   c                   @   \ rS rSrS\R
                  -   rSSSSSSS	S
SSSSSS.SS0S.SSSSSSSSSSSSSS.SS0S.SSSSSS S!S"S#S$SS%S&.SS0S'S(.S)S*S+S,SS-S.S/S0S1S2SS3SS4.S5.S6S7S8SS9S:S;S<S=S>S?S3SS4.SS0S.S@SSA.SBSSA.SCSSA.SDSSA.SESSA.SFSSA.SGSSA.SHSSA./rSI rSJr	gK)LDPlayIE   a9  (?x)https?://
        (?P<domain>
            (?:www\.)?(?P<host>d
                (?:
                    play\.(?P<country>dk|fi|jp|se|no)|
                    iscoveryplus\.(?P<plus_country>dk|es|fi|it|se|no)
                )
            )|
            (?P<subdomain_country>es|it)\.dplay\.com
        )/[^/]+zshttps://www.dplay.se/videos/nugammalt-77-handelser-som-format-sverige/nugammalt-77-handelser-som-format-sverige-10113628zWnugammalt-77-handelser-som-format-sverige/nugammalt-77-handelser-som-format-sverige-101r]   u    Svensken lär sig njuta av livetz$md5:d3819c9bccffd0fe458ca42451dd50d8gʡE@i+cQ20130408zKanal 5u,   Nugammalt - 77 händelser som format Sveriger   rV   r$   r   ro   ri   rp   rq   upload_dateru   rr   rs   rt   skip_downloadTrF   	info_dictparamszShttp://www.dplay.dk/videoer/ted-bundy-mind-of-a-monster/ted-bundy-mind-of-a-monster104465z7ted-bundy-mind-of-a-monster/ted-bundy-mind-of-a-monsterzTed Bundy: Mind Of A Monsterz$md5:8b780f6f18de4dae631668b8a9637995gx@i ]20191010zID - Investigation Discoveryz=https://www.dplay.no/videoer/i-kongens-klr/sesong-1-episode-740206z i-kongens-klr/sesong-1-episode-7	Episode 7z$md5:e3e1411b2b9aebeea36a6ec5d50c60cfgQf@ijgZ20180123u   I kongens klær   )rV   r$   r   ro   ri   rp   rq   r   rr   rs   rt   Available for Premium users)rF   r   r   skipzZhttp://it.dplay.com/nove/biografie-imbarazzanti/luigi-di-maio-la-psicosi-di-stanislawskij/ 2b808ffb00fc47b884a172ca5d13053c6918z@biografie-imbarazzanti/luigi-di-maio-la-psicosi-di-stanislawskijz*Luigi Di Maio: la psicosi di Stanislawskijz$md5:3c7a4303aef85868f867a26f5cc14813zre:^https?://.*\.jpe?g20160524i 
DWzBiografie imbarazzanti	Episode 1)rV   r$   r   ro   ri   	thumbnailr   rq   rr   rs   episodert   )rF   md5r   zChttps://es.dplay.com/dmax/la-fiebre-del-oro/temporada-8-episodio-1/21652z(la-fiebre-del-oro/temporada-8-episodio-1z
Episodio 1z$md5:b9dcff2071086e003737485210675f69zre:^https?://.*\.png20180709iC[zLa fiebre del oro   zHhttps://www.dplay.fi/videot/shifting-gears-with-aaron-kaufman/episode-16rF   only_matchingz*https://www.dplay.jp/video/gold-rush/24086z{https://www.discoveryplus.se/videos/nugammalt-77-handelser-som-format-sverige/nugammalt-77-handelser-som-format-sverige-101z\https://www.discoveryplus.dk/videoer/ted-bundy-mind-of-a-monster/ted-bundy-mind-of-a-monsterzEhttps://www.discoveryplus.no/videoer/i-kongens-klr/sesong-1-episode-7zdhttps://www.discoveryplus.it/videos/biografie-imbarazzanti/luigi-di-maio-la-psicosi-di-stanislawskijzLhttps://www.discoveryplus.es/videos/la-fiebre-del-oro/temporada-8-episodio-1zPhttps://www.discoveryplus.fi/videot/shifting-gears-with-aaron-kaufman/episode-16c                 L   U R                  U5      nUR                  S5      n[        UR                  S5      S5      nUR                  S5      =(       d)    UR                  S5      =(       d    UR                  S5      nUS   S:X  a  S	U-   OS
nU R                  XUSU-   XT5      $ )NrV   r   zwww.r   subdomain_countryplus_countryr   dz
disco-api.zeu2-prod.disco-api.comdplay)_match_valid_urlgroupr   r   )r"   rF   mobjr$   r   r   hosts          r'   _real_extractDPlayIE._real_extract8  s    $$S)ZZ%
djj2F;**Y'h4::6I+JhdjjYgNh(.q	S(8|f$>V''T7W#4gG 	Gr*   r   N)
r   r   r   r   r   r   
_VALID_URL_TESTSr   r   r   r*   r'   r   r      s   	 !,,	-J Es7A #% D
 T
#, eS3A #%54
 T
#, O< A#%'
 T
 .'* l1\AA2%#."
$ UD!A0%#)"
 T
!( Z < M n W v ^ bkxFtGr*   r   c                   .    \ rS rSrSrSrS rS rS rSr	g)	DiscoveryPlusBaseIEiB  z/Subclasses must set _PRODUCT, _DISCO_API_PARAMSz27.43.0c           	          UR                  SU SU R                   3SU R                   SU R                   3U R                  X#U5      S.5        g )Nrealm=,siteLookupKey=WEB:UNKNOWN::x-disco-paramsx-disco-clientr?   update_PRODUCT_DISCO_CLIENT_VERr(   r@   s        r'   rB   -DiscoveryPlusBaseIE._update_disco_api_headersG  sP     &ug_T]]OL ,T]]O1T=S=S<TU!^^JEJ
 	r*   c                     U R                  US-   X#[        R                  " SSS.U0 S.5      R                  5       S9S   S   S   $ )	Nzplayback/v3/videoPlaybackInfoF)	adBlockerdrmSupported)
deviceInfovideoIdwisteriaProperties)rA   r   r   r   rE   )r!   jsondumpsencode)r"   r#   rJ   rA   s       r'   rN   1DiscoveryPlusBaseIE._download_video_playback_infoN  sp    ""88DJJ!&$) $&(8 - vx # 	  	! ".	/ 0;	< 		<r*   c                 Z    U R                   " XR                  U5      40 U R                  D6$ )N)r   	_match_id_DISCO_API_PARAMS)r"   rF   s     r'   r   !DiscoveryPlusBaseIE._real_extractZ  s'    ''^^C-@[DDZDZ[[r*   r   N)
r   r   r   r   __doc__r   rB   rN   r   r   r   r*   r'   r   r   B  s    9!
<\r*   r   c                       \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S/ _S S!_S"./rS#rS$S#S%S&.r	S' r
S(rg))*HGTVDeIEi^  z https?://de\.hgtv\.com/sendungenzNhttps://de.hgtv.com/sendungen/mein-kleinstadt-traumhaus/vom-landleben-ins-loftrV   7332936r   r]   r$   z0mein-kleinstadt-traumhaus/vom-landleben-ins-loftro   zVom Landleben ins Loftri   z$md5:e5f72c02c853970796dd3818f2e25745r   r   rt   r   seasonSeason 7rs   rr   zMein Kleinstadt-Traumhausrp   g     @rq   ifr   20240910creatorsHGTVrv   r   zZhttps://eu1-prod-images.disco-api.com/2024/08/09/82a386b9-c688-32c7-b9ff-0b13865f0bae.jpegrF   r   hgtveu1-prod.disco-api.comder   r   r   c           	      T    UR                  SU 3SU R                  X#U5      S.5        g Nr   zAlps:HyogaPlayer:0.0.0r   r   r(   r@   s        r'   rB   "HGTVDeIE._update_disco_api_headers}  .     &ug.6!^^JEJ
 	r*   r   Nr   r   r   r   r   r   r   r   r   r   rB   r   r   r*   r'   r   r   ^  s   4{7N7NNJ_
)
5
 L
 -	

 A
 {
 a
 j
 Q
 1
 
 
 :
 
 B
  u!
 F, H.r*   r   c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_S/ _SS/_S S!_S".S#S$S%S	S&S'S(SS).S*S+.S,S-S../rS/rS0S1S2S3.r	S4r
g5)6GoDiscoveryIEi  z&https?://(?:go\.)?discovery\.com/videoz]https://go.discovery.com/video/in-the-eye-of-the-storm-discovery-atve-us/trapped-in-a-twisterrV   5352642r$   z>in-the-eye-of-the-storm-discovery-atve-us/trapped-in-a-twisterr   r]   ro   zTrapped in a Twisterri   zJTwisters destroy Midwest towns, trapping spotters in the eye of the storm.rt   r   r   r   rs   r   Season 1rr   zIn The Eye Of The Stormrp   gNbXyt@r   20240715rq   ifrv   r   	Discoveryr   zZhttps://us1-prod-images.disco-api.com/2024/07/10/5e39637d-cabf-3ab3-8e9a-f4e9d37bc036.jpegr   zPhttps://go.discovery.com/video/dirty-jobs-discovery-atve-us/rodbuster-galvanizer4164906z1dirty-jobs-discovery-atve-us/rodbuster-galvanizerzRodbuster / GalvanizerzHMike installs rebar with a team of rodbusters, then he galvanizes steel.	   rV   r$   r   ro   ri   rs   rt   r   rF   r   r   zMhttps://discovery.com/video/dirty-jobs-discovery-atve-us/rodbuster-galvanizerTr   dscz us1-prod-direct.go.discovery.comgousr   r   Nr   r   r   r   r   r   r   r   r   r   r   r   r*   r'   r   r     s;   :[=T=TTJn
)
Z
 5
 +	

 g
 a
 {
 Q
 j
 /
 
 :
 
 B
 
  u!
* bM-e
 . _A#FJ H8r*   r   c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_S/ _SS /_S!S"_S#.S$S%S&S	S'S(S)S*S+.S,S-.S$S.S/./rS0rS1S2S3S4.r	S5r
g6)7TravelChannelIEi  z-https?://(?:watch\.)?travelchannel\.com/videozXhttps://watch.travelchannel.com/video/the-dead-files-travel-channel/protect-the-childrenrV   4710177r$   z2the-dead-files-travel-channel/protect-the-childrenr   r]   ro   zProtect the Childrenri   zAAn evil presence threatens an Ohio woman's children and marriage.rs      r   z	Season 14rt   
   r   z
Episode 10rr   zThe Dead Filesrp   gʡE@rq   ii6cr   20220930rv   r   zTravel Channelr   zZhttps://us1-prod-images.disco-api.com/2022/03/17/5e45eace-de5d-343a-9293-f400a2aa77d5.jpegr   zXhttps://watch.travelchannel.com/video/ghost-adventures-travel-channel/ghost-train-of-ely2220256z2ghost-adventures-travel-channel/ghost-train-of-elyzGhost Train of ElyzFThe crew investigates the dark history of the Nevada Northern Railway.   r   r  r   r  Tr   travz'us1-prod-direct.watch.travelchannel.comr  r  r   r   Nr  r   r*   r'   r  r    s=   AKD[D[[Ji
)
N
 5
 +	

 _
 R
 k
 b
 |
 &
 
 
 :
 B
 )*
  u!
* jN)c
 . jA#FJ H?r*   r  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_S/ _SS /_S!S"_S#.S$S%S&SS'S(S)SS*.S+S,.S$S-S../rS/rS0S1S2S3.r	S4r
g5)6CookingChannelIEi  z0https?://(?:watch\.)?cookingchanneltv\.com/videoznhttps://watch.cookingchanneltv.com/video/bobbys-triple-threat-food-network-atve-us/titans-vs-marcus-samuelssonrV   5350005r   r]   r$   zEbobbys-triple-threat-food-network-atve-us/titans-vs-marcus-samuelssonro   zTitans vs Marcus Samuelssonri   zCMarcus Samuelsson throws his legendary global tricks at the Titans.rt   r   r   r   rs      r   zSeason 3rr   zBobby's Triple Threatrp   gˡE@r   20240710rq   iݍfrv   r   Food Networkr   zZhttps://us1-prod-images.disco-api.com/2024/07/04/529cd095-27ec-35c5-84e9-90ebd3e5d2da.jpegr   zmhttps://watch.cookingchanneltv.com/video/carnival-eats-cooking-channel/the-postman-always-brings-rice-23486342348634zDcarnival-eats-cooking-channel/the-postman-always-brings-rice-2348634zThe Postman Always Brings RicezFNoah visits the Maui Fair and the Aurora Winter Festival in Vancouver.r   r  r   r  Tr   cookz*us1-prod-direct.watch.cookingchanneltv.comr  r  r   r   Nr  r   r*   r'   r  r    s<   D{G^G^^J
)
5
 a
 2	

 `
 a
 {
 Q
 j
 .
 
 :
 
 B
 (
  u!
* `5c
 . A#FJ HBr*   r  c                       \ rS rSrS\R
                  -   rSSSSSSSS	S
S/ S/SS.S.SSSSSSSSS.SS.SSS./rSrSSSS.r	S r
g!)"	HGTVUsaIEi  z$https?://(?:watch\.)?hgtv\.com/videozahttps://watch.hgtv.com/video/flip-or-flop-the-final-flip-hgtv-atve-us/flip-or-flop-the-final-flip5025585zDflip-or-flop-the-final-flip-hgtv-atve-us/flip-or-flop-the-final-flipr]   zFlip or Flop: The Final FlipzFTarek and Christina are going their separate ways after one last flip!g?5^I)@20231101i@Aer   zZhttps://us1-prod-images.disco-api.com/2022/11/27/455caa6c-1462-3f14-b63d-a026d7a5e6d3.jpeg)rV   r$   r   ro   ri   rr   rp   r   rq   rv   r   r   r   zLhttps://watch.hgtv.com/video/home-inspector-joe-hgtv-atve-us/this-mold-house4289736z/home-inspector-joe-hgtv-atve-us/this-mold-housezThis Mold HousezGJoe and Noel help take a familys dream home from hazardous to fabulous.r   r  r   r  Tr   r   zus1-prod-direct.watch.hgtv.comr  r  r   r   Nr  r   r*   r'   r  r    s    8;;R;RRJr`3c4 %#u
" ^K&d
 . ^9FB H6r*   r  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_S/ _SS/_SS_SS_SS_S S!_S".S#S$S%S	S&S'S(SS).S*S+.S#S,S-./rS.rS/S0S1S2.r	S3r
g4)5FoodNetworkIEi=  z+https?://(?:watch\.)?foodnetwork\.com/videozVhttps://watch.foodnetwork.com/video/guys-grocery-games-food-network/wild-in-the-aislesrV   2152549r$   z2guys-grocery-games-food-network/wild-in-the-aislesr   r]   ro   zWild in the Aislesri   zGThe chefs make spaghetti and meatballs with "Out of Stock" ingredients.rs   r   r   r   rt   r   r   rr   zGuy's Grocery Gamesrv   r   r  rp   gd;OM@r   20230623rq   dr   zZhttps://us1-prod-images.disco-api.com/2022/06/15/37fb5333-cad2-3dbb-af7c-c20ec77c89c6.jpegr   z`https://watch.foodnetwork.com/video/kids-baking-championship-food-network/float-like-a-butterfly4116449z<kids-baking-championship-food-network/float-like-a-butterflyzFloat Like a Butterflyz9The 12 kid bakers create colorful carved butterfly cakes.r  r  r   r  Tr   foodz%us1-prod-direct.watch.foodnetwork.comr  r  r   r   Nr  r   r*   r'   r  r  =  s<   ?+BYBYYJg
)
N
 5
 )	

 d
 Q
 j
 a
 {
 ,
 B
 (
 
 :
 
  u!
* rX-V
 . rA#FJ H=r*   r  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_S/ _SS/_SS_SS_SS _S!S"_S#.S$S%S&S	S'S(SSS).S*S+.S$S,S-./rS.rS/S0S1S2.r	S3r
g4)5DestinationAmericaIEil  z0https?://(?:www\.)?destinationamerica\.com/videoz\https://www.destinationamerica.com/video/bbq-pit-wars-destination-america/smoke-on-the-waterrV   2218409r$   z3bbq-pit-wars-destination-america/smoke-on-the-waterr   r]   ro   zSmoke on the Waterri   zGThe pitmasters head to Georgia for the Smoke on the Water BBQ Festival.rs   r   r   zSeason 2rt   r   r   r   rr   zBBQ Pit Warsrv   r   zDestination Americarp   gK7m@r   r   rq   r!  r   zZhttps://us1-prod-images.disco-api.com/2020/05/11/c0f8e85d-9a10-3e6f-8e43-f6faafa81ba2.jpegr   zlhttps://www.destinationamerica.com/video/alaska-monsters-destination-america-atve-us/central-alaskas-bigfoot4210904zCalaska-monsters-destination-america-atve-us/central-alaskas-bigfootzCentral Alaskas BigfootzDA team heads to central Alaska to investigate an aggressive Bigfoot.r  r   r  Tr   damz&us1-prod-direct.destinationamerica.comr  r  r   r   Nr  r   r*   r'   r%  r%  l  s<   D{G^G^^Jm
)
O
 5
 )	

 d
 Q
 j
 a
 {
 n
 B
 ./
 
 :
 
  u!
* ~_.a
 . ~A#FJ H>r*   r%  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS/_S/ _SS_SS_SS _S!S"_S#.S$S%S&S	S'S(SSS).S*S+.S$S,S-./rS.rS/S0S1S2.r	S3r
g4)5InvestigationDiscoveryIEi  z4https?://(?:www\.)?investigationdiscovery\.com/videozhttps://www.investigationdiscovery.com/video/deadly-influence-the-social-media-murders-investigation-discovery-atve-us/rip-biancarV   5341132r$   zTdeadly-influence-the-social-media-murders-investigation-discovery-atve-us/rip-biancar   r]   ro   z
RIP Biancari   zJA teenage influencer discovers an online world of threat, harm and danger.rs   r   r   r   rt   r  r   z	Episode 3rr   z*Deadly Influence: The Social Media Murdersr   zInvestigation Discoveryrv   rp   gu@r   20240618rq   ipfr   zZhttps://us1-prod-images.disco-api.com/2024/06/15/b567c774-9e44-3c6c-b0ba-db860a73e812.jpegr   z^https://www.investigationdiscovery.com/video/unmasked-investigation-discovery/the-killer-clown2139409z1unmasked-investigation-discovery/the-killer-clownzThe Killer ClownzKA wealthy Florida woman is fatally shot in the face by a clown at her door.r  r   r  Tr   idsz*us1-prod-direct.investigationdiscovery.comr  r  r   r   Nr  r   r*   r'   r*  r*    s?   H;KbKbbJ S
)
p
 5
 \	

 g
 Q
 j
 a
 {
 B
 23
 B
 
 :
 
  u!
* pM'h
 . pA#FJ HBr*   r*  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S/ _S S!_S".S#S$S%S	S&S'SSS(.S)S*.S#S+S,./rS-rS.S/S0S1.r	S2r
g3)4AmHistoryChannelIEi  z#https?://(?:www\.)?ahctv\.com/videozThttps://www.ahctv.com/video/blood-and-fury-americas-civil-war-ahc/battle-of-bull-runrV   2139199r$   z8blood-and-fury-americas-civil-war-ahc/battle-of-bull-runr   r]   ro   zBattle of Bull Runri   zDTwo untested armies clash in the first real battle of the Civil War.rs   r   r   r   rt   r   r   rr   z#Blood and Fury: America's Civil Warrp   gT㥛i@r   20220923rq   i@/-cr   AHCrv   r   zZhttps://us1-prod-images.disco-api.com/2020/05/11/4af61bd7-d705-3108-82c4-1a6e541e20fa.jpegr   z2https://www.ahctv.com/video/modern-sniper-ahc/army2309730zmodern-sniper-ahc/armyArmyzISnipers today face challenges their predecessors couldve only dreamed of.r  r   r  Tr   ahczus1-prod-direct.ahctv.comr  r  r   r   Nr  r   r*   r'   r0  r0    s;   7+:Q:QQJe
)
T
 5
 )	

 a
 Q
 j
 a
 {
 <
 
 :
 
 
 B
  u!
* D2f
 . DA#FJ H1r*   r0  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S / _S!S"_S#.S$S%S&S	S'S(SSS).S*S+.S$S,S-./rS.rS/S0S1S2.r	S3r
g4)5ScienceChannelIEi  z,https?://(?:www\.)?sciencechannel\.com/videozghttps://www.sciencechannel.com/video/spaces-deepest-secrets-science-atve-us/mystery-of-the-dead-planetsrV   2347335r$   zBspaces-deepest-secrets-science-atve-us/mystery-of-the-dead-planetsr   r]   ro   zMystery of the Dead Planetsri   z>Astronomers unmask the truly destructive nature of the cosmos.rs   r   r   r   rt   r   r   r   rr   zSpace's Deepest Secretsrp   g}?5^@r   20230128rq   iЫcr   Sciencerv   r   zZhttps://us1-prod-images.disco-api.com/2021/03/30/3796829d-aead-3f9a-bd8d-e49048b3cdca.jpegr   zZhttps://www.sciencechannel.com/video/strangest-things-science-atve-us/nazi-mystery-machine2842849z5strangest-things-science-atve-us/nazi-mystery-machinezNazi Mystery MachinezFExperts investigate the secrets of a revolutionary encryption machine.r  r   r  Tr   sciz"us1-prod-direct.sciencechannel.comr  r  r   r   Nr  r   r*   r'   r8  r8    s;   @;CZCZZJx
)
^
 5
 2	

 [
 Q
 j
 a
 {
 0
 
 :
 
 
 B
  u!
* lQ+c
 . lA#FJ H:r*   r8  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S/ _S S!_S".S#S$S%S	S&S'SS(S).S*S+.S#S,S-./rS.rS/S0S1S2.r	S3r
g4)5DiscoveryLifeIEi(  z+https?://(?:www\.)?discoverylife\.com/videozQhttps://www.discoverylife.com/video/er-files-discovery-life-atve-us/sweet-charityrV   2347614r$   z-er-files-discovery-life-atve-us/sweet-charityr   r]   ro   zSweet Charityri   z=The staff at Charity Hospital treat a serious foot infection.rs   r   r   r   rt   r   r   rr   zER Filesrp   gʡx@r   20230721rq   idr   zDiscovery Liferv   r   zZhttps://us1-prod-images.disco-api.com/2021/03/16/4b6f0124-360b-3546-b6a4-5552db886b86.jpegr   zXhttps://www.discoverylife.com/video/surviving-death-discovery-life-atve-us/bodily-trauma2218238z4surviving-death-discovery-life-atve-us/bodily-traumazBodily Traumaz:Meet three people who tested the limits of the human body.r   r  r   r  Tr   dlfz!us1-prod-direct.discoverylife.comr  r  r   r   Nr  r   r*   r'   r?  r?  (  s;   ?+BYBYYJb
)
I
 5
 _	

 Z
 Q
 j
 a
 {
 j
 
 :
 
 )*
 B
  u!
* jP$W
 . jA#FJ H9r*   r?  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S / _S!S"_S#.S$S%S&S	S'S(S)S*S+.S,S-.S$S.S/./rS0rS1S2S3S4.r	S5r
g6)7AnimalPlanetIEiW  z*https?://(?:www\.)?animalplanet\.com/videozthttps://www.animalplanet.com/video/mysterious-creatures-with-forrest-galante-animal-planet-atve-us/the-demon-of-perurV   4650835r$   zQmysterious-creatures-with-forrest-galante-animal-planet-atve-us/the-demon-of-perur   r]   ro   zThe Demon of Peruri   uI   In Peru, a farming village is being terrorized by a “man-like beast.”rs   r   r   r   rt      r   z	Episode 4rr   z)Mysterious Creatures with Forrest Galanterp   g"t@r   20230111rq   iPBcr   zAnimal Planetrv   r   zZhttps://us1-prod-images.disco-api.com/2022/03/01/6dbaa833-9a2e-3fee-9381-c19eddf67c0c.jpegr   zRhttps://www.animalplanet.com/video/north-woods-law-animal-planet/squirrel-showdown3338923z/north-woods-law-animal-planet/squirrel-showdownzSquirrel ShowdownzDA woman is suspected of being in possession of flying squirrel kits.      r  r   r  Tr   aplz us1-prod-direct.animalplanet.comr  r  r   r   Nr  r   r*   r'   rE  rE  W  s?   >AXAXXJ F
)
m
 5
 (	

 f
 Q
 j
 a
 {
 A
 
 :
 
 )
 B
  u!
* dK(a 
 . dA#FJ H8r*   rE  c            
           \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S/ _S S!_S".S#S$S%S	S&S'SSS(.S)S*.S#S+S,./rS-rS.S/S0S1.r	S2r
g3)4TLCIEi  z https?://(?:go\.)?tlc\.com/videozKhttps://go.tlc.com/video/90-day-the-last-resort-tlc-atve-us/the-last-chancerV   5186422r$   z290-day-the-last-resort-tlc-atve-us/the-last-chancer   r]   ro   zThe Last Chanceri   zJInfidelity shakes Kalani and Asuelu's world, and Angela threatens divorce.rs   r   r   r   rt   r   r   rr   z90 Day: The Last Resortrp   g\@r   20230815rq   idr   TLCrv   r   zZhttps://us1-prod-images.disco-api.com/2023/08/08/0ee367e2-ac76-334d-bf23-dbf796696a24.jpegr   zAhttps://go.tlc.com/video/my-600-lb-life-tlc/melissas-story-part-12206540z(my-600-lb-life-tlc/melissas-story-part-1zMelissas Story (Part 1)zIAt 650 lbs, Melissa is ready to begin her seven-year weight loss journey.r  r   r  Tr   tlczus1-prod-direct.tlc.comr  r  r   r   Nr  r   r*   r'   rN  rN    s;   4{7N7NNJ\
)
N
 5
 &	

 h
 Q
 j
 a
 {
 /
 
 :
 
 
 B
  u!
* SD.f
 . SA#FJ H/r*   rN  c                       \ rS rSrS\R
                  -   rSSSSSSS	S
SSSSSS.SS.SSS.SSS.SSS./rSrSr	S r
S rSrg)DiscoveryPlusIEi  zbhttps?://(?:www\.)?discoveryplus\.com/(?!it/)(?:(?P<country>[a-z]{2})/)?video(?:/sport|/olympics)?zRhttps://www.discoveryplus.com/video/property-brothers-forever-home/food-and-family1140794z.property-brothers-forever-home/food-and-familyr]   zFood and FamilyzCThe brothers help a Richmond family expand their single-level home.g"9.@iP	_20201230r   zProperty Brothers: Forever Homer   r   r   r  zLhttps://discoveryplus.com/ca/video/bering-sea-gold-discovery-ca/goldslingersTr   zphttps://www.discoveryplus.com/gb/video/sport/eurosport-1-british-eurosport-1-british-sport/6-hours-of-spa-reviewzjhttps://www.discoveryplus.com/gb/video/olympics/dplus-sport-dplus-sport-sport/rugby-sevens-australia-samoaNc           	          UR                  SU SU R                   3SU R                   3U R                  X#U5      S.5        g Nr   r   zWEB:UNKNOWN:dplus_us:r   r   r@   s        r'   rB   )DiscoveryPlusIE._update_disco_api_headers  F     &ug_T]]OL 5d6L6L5MN!^^JEJ
 	r*   c                     U R                  U5      R                  SS5      u  p#U(       d  SnSU 3U l        US;   a  SSUS.U l        OS	S
US.U l        U R                  " X40 U R                  D6$ )NrV   r   r  dplus_)brcar  z!us1-prod-direct.discoveryplus.comr  r   !eu1-prod-direct.discoveryplus.comr   )r   r   r   r   r   )r"   rF   rJ   r   s       r'   r   DiscoveryPlusIE._real_extract  s     11#6<<T9MG 	*((A"&D" B "&D" ''P9O9OPPr*   )r   r   )r   r   r   r   r   r   r   r   r   r   rB   r   r   r   r*   r'   rU  rU    s    v  zE  zQ  zQ  QJcJ&` #%7
 .!$ ^ B |/F8 HQr*   rU  c                       \ rS rSrS\R
                  -   rS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_S S!_S"/ _S#S$0S%./rS&rS'S(S)S*S+.r	S, r
S-rg.)/DiscoveryPlusIndiaIEi  z,https?://(?:www\.)?discoveryplus\.in/videos?z[https://www.discoveryplus.in/videos/how-do-they-do-it/fugu-and-more?seasonId=8&type=EPISODErV   27104r   r]   r$   zhow-do-they-do-it/fugu-and-morero   zFugu and Moreri   zEThe Japanese catch, prepare and eat the deadliest fish on the planet.rp   gzG@rq   i!P^r   20200221rr   zHow Do They Do It?rs   r   rt   r   ru   zDiscovery Channelr   zre:https://.+\.jpegr   z	Episode 2r   zSeason 8rv   r   Tr   zdplus-indiaz ap2-prod-direct.discoveryplus.in
dplusindiainhttps://www.discoveryplus.in/)r   r   r   r   c           	      p    UR                  SU 3SU R                   S3U R                  X#U5      S.5        g )Nr   r   z:17.0.0r   )r   r   r(   r@   s        r'   rB   .DiscoveryPlusIndiaIE._update_disco_api_headers  s;     &ug. ,T]]O7C!^^JEJ
 	r*   r   Nr   r   r*   r'   rc  rc    s   @;CZCZZJl
'
5
 ;
 _	

 b
 
 
 :
 *
 Q
 a
 *
 /
 {
 j
  B!
& T
) F2 H81	r*   rc  c                   "   \ rS rSrSrS0 SS_SS_SS	_S
S_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS/_S S!_S"/ S#Q_S$S%0S&.S'0 SS(_SS_SS)_S
S*_SS+_SS,_S-S._SS/_SS0_SS_S"/ S1Q_SS2_SS_SS3_SS_S S4_S5S6.S7S8S9.S:S8S9.S;S8S9./rS< rS= rS>rg?)@DiscoveryNetworksDeIEi  zhttps?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de|dplay\.co\.uk)/(?:programme|show|sendungen)/(?P<programme>[^/]+)/(?:video/)?(?P<alternate_id>[^/]+)z>https://dmax.de/sendungen/goldrausch-in-australien/german-goldrV   4756322r   r]   ro   zGerman Goldri   z$md5:f3073306553a8d9b40e6ac4cdbf09fc6r$   z$goldrausch-in-australien/german-goldr   r   rt   r   r   zSeason 5rs      rr   zGoldrausch in Australienrp   g     @r   20230517rq   i|Aedr   DMAXr   zZhttps://eu1-prod-images.disco-api.com/2023/05/09/f72fb510-7992-3b12-af7f-f16a2c22d1e3.jpegrv   )schatzsucherschatznuggetu   bodenschätzez
down under
australien
goldrauschr   r\   r   zThttps://www.tlc.de/programme/breaking-amish/video/die-welt-da-drauen/DCB33127000110078867u   Die Welt da draußenz$md5:61033c12b73286e409d99a41742ef608i`8\20190331ru   rQ  r   zBreaking Amish)znew yorku
   großstadtamische	landlebenmoderninfos	traditionherausforderungz!breaking-amish/die-welt-da-draueng5^I@zre:https://.+\.jpgz404 Not Foundr  zqhttps://www.dmax.de/programme/dmax-highlights/video/tuning-star-sidney-hoffmann-exklusiv-bei-dmax/191023082312316Tr   zRhttps://www.dplay.co.uk/show/ghost-adventures/video/hotel-leger-103620/EHD_280313Bz;https://tlc.de/sendungen/breaking-amish/die-welt-da-drauen/c                     U R                  U5      R                  5       u  p#nUS:X  a  SOSnUS:X  a  SOUR                  SS5      nU R                  X SU 3SXe5      $ )	Nzdplay.co.ukGBDEquestuk.r   rR   r   )r   groupsreplacer   )r"   rF   r   	programmealternate_idr   r   s          r'   r   #DiscoveryNetworksDeIE._real_extractW  sn    *.*?*?*D*K*K*M'< M1$t$_	&..b2I'';a~.0H%Z 	Zr*   c           	      T    UR                  SU 3SU R                  X#U5      S.5        g r   r   r@   s        r'   rB   /DiscoveryNetworksDeIE._update_disco_api_headers^  r   r*   r   N)	r   r   r   r   r   r   r   rB   r   r   r*   r'   rl  rl    s    gJ P
)
5
 ]
 A	

 @
 {
 a
 j
 Q
 0
 
 :
 
 
 u
  s!
$ #F+), f
'
5
 +
 A	

 
 :
 u
 j
 &
 a
 y
 =
 {
 
 Q
  .!
$  ), C d Ma3FjZr*   rl  c                        \ rS rSrS rS rSrg)DiscoveryPlusShowBaseIEif  c              #   v  #    U R                   SU R                   3U R                  U R                  U R                  S U R                  5      S.nU R                  U R                   SU R                   SU S3XS9S   U R                     S   S	   nUS
   R                  S5      S   nU R                  S-   nUS   S   S    H  nUS   nSu  pX:  d  M  U R                  UR                  Xt[        U	S-   5      5      XSR                  Xy(       a  SU	 3OS5      S9n
U	S:X  a  [        U
S [        5      =(       d    SnU
S   nU H]  nUS   S   nU R                  U R                   SU 3U R                  R                  5       UR!                  S5      =(       d    US9v   M_     U	S-  n	X:  a  M  M     g 7f)Nr   )r   r   rn   Authenticationzcms/routes/rR   z?include=default)rJ   rA   ra   r   	componentmandatoryParams=zkcontent/videos?sort=episodeNumber&filter[seasonNumber]={}&filter[show.id]={}&page[size]=100&page[number]={}filtersr   optionsrV   )r   r   r   z%Downloading season {} JSON metadata{}z page r   )rA   notec                     U S   S   $ )Nmeta
totalPagesr   )xs    r'   <lambda>2DiscoveryPlusShowBaseIE._entries.<locals>.<lambda>|  s    6<AXr*   r   pathzvideos/)ierJ   )	_X_CLIENT_REALM_DOMAINr(   	_BASE_APIr!   	_SHOW_STR_INDEXsplitformatstrr   int
url_result	_VIDEO_IEie_keyr   )r"   	show_namerA   	show_jsonshow_id
season_urlr   	season_idtotal_pagespage_numseason_jsonepisodes_jsonr   
video_paths                 r'   _entries DiscoveryPlusShowBaseIE._entriesh  s    "nn &t{{m4||"nnT^^T4;;O	
 ''~~k$..)99+EUV ( 11;==A[[JJVXXce	 -.44S9"=^^  'T  T
	*1-i8FtI$(!K("11%%i#hl:KLi@GG	jrU[\d[eSfxz{ 2 } q=")+7XZ]"^"cbcK +F 3,G!(!6v!>J//<<.
|<>>002W[[=N=\R\ * ^ ^  -
 A ( 9s   CF9CF94F9c                     U R                  U5      R                  S5      nU R                  U R                  U5      US9$ )Nr  )playlist_id)r   r   playlist_resultr  )r"   rF   r  s      r'   r   %DiscoveryPlusShowBaseIE._real_extract  s<    ))#.44[A	##DMM)$<)#TTr*   r   N)r   r   r   r   r  r   r   r   r*   r'   r  r  f  s    :Ur*   r  c                   l    \ rS rSrS\R
                  -   rSSS.SSS.SSS.SSS./rS	rS
SSS.r	S r
Srg)DiscoveryPlusItalyIEi  zChttps?://(?:www\.)?discoveryplus\.com/it/video(?:/sport|/olympics)?z_https://www.discoveryplus.com/it/video/i-signori-della-neve/stagione-2-episodio-1-i-preparativiTr   z:https://www.discoveryplus.com/it/video/super-benny/trailerzehttps://www.discoveryplus.com/it/video/olympics/dplus-sport-dplus-sport-sport/water-polo-greece-italyzmhttps://www.discoveryplus.com/it/video/sport/dplus-sport-dplus-sport-sport/lisa-vittozzi-allinferno-e-ritornodplus_itr`  r   itr   c           	          UR                  SU SU R                   3SU R                   3U R                  X#U5      S.5        g rY  r   r@   s        r'   rB   .DiscoveryPlusItalyIE._update_disco_api_headers  r[  r*   r   Nr   r   r*   r'   r  r    sl    WZeZqZqqJp L w F H9r*   r  c                   F    \ rS rSrSrSSSS0S./rSrS	rS
rSr	Sr
Sr\rSrg)DiscoveryPlusItalyShowIEi  zOhttps?://(?:www\.)?discoveryplus\.it/programmi/(?P<show_name>[^/]+)/?(?:[?#]|$)zAhttps://www.discoveryplus.it/programmi/deal-with-it-stai-al-gioco   rV   zdeal-with-it-stai-al-giocorF   playlist_mincountr   z#https://disco-api.discoveryplus.it/zhttps://www.discoveryplus.it/zWEB:UNKNOWN:dplay-client:2.6.0dplayit	programmir   r   N)r   r   r   r   r   r   r  r  r  r  r  r  r   r  r   r   r*   r'   r  r    sI    cJR .
 F 6I-G0IFIFIr*   r  c                   F    \ rS rSrSrSSSS0S./rSrS	rS
rSr	Sr
Sr\rSrg)DiscoveryPlusIndiaShowIEi  zJhttps?://(?:www\.)?discoveryplus\.in/show/(?P<show_name>[^/]+)/?(?:[?#]|$)z3https://www.discoveryplus.in/show/how-do-they-do-it   rV   zhow-do-they-do-itr  z)https://ap2-prod-direct.discoveryplus.in/rh  zWEB:UNKNOWN:dplus-india:prodrf  rg   rG  r   N)r   r   r   r   r   r   r  r  r  r  r  r  rc  r  r   r   r*   r'   r  r    sI    ^JD %
 F <I-G.IFIF$Ir*   r  )&r   r   commonr   networking.exceptionsr   utilsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r  r  r  r  r%  r*  r0  r8  r?  rE  rN  rU  rc  rl  r  r  r  r  r   r*   r'   <module>r     sh     ! -	 	 	]
- ]
@MGk MG`\+ \8$" $N,' ,^,) ,^,* ,^(# (V,' ,^,. ,^,2 ,^,, ,^,* ,^,) ,^,( ,^, ,^<Q) <Q~(. (VD/ DN!Uk !UH. >6 &%6 %r*   