
    VGhSr                        d dl Z d dlZddlmZ ddlmZ ddlmZmZm	Z	m
Z
mZmZ  G d de      Zdtd	Z G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d  d!e      Z G d" d#e      Z G d$ d%e      Z G d& d'e      Z G d( d)e      Z G d* d+e      Z G d, d-e      Z  G d. d/e       Z! G d0 d1e       Z" G d2 d3e       Z# G d4 d5e      Z$ G d6 d7e$      Z% G d8 d9e$      Z& G d: d;e$      Z' G d< d=e      Z( G d> d?e(      Z) G d@ dAe(      Z* G dB dCe(      Z+ G dD dEe      Z, G dF dGe,      Z- G dH dIe,      Z. G dJ dKe,      Z/ G dL dMe      Z0 G dN dOe0      Z1 G dP dQe0      Z2 G dR dSe0      Z3 G dT dUe      Z4 G dV dWe4      Z5 G dX dYe4      Z6 G dZ d[e4      Z7 G d\ d]e      Z8 G d^ d_e8      Z9 G d` dae8      Z: G db dce8      Z; G dd dee      Z< G df dge<      Z= G dh die<      Z> G dj dke<      Z? G dl dme      Z@ G dn doe@      ZA G dp dqe@      ZB G dr dse@      ZCy)u    N   )InfoExtractor   )	HTTPError)ExtractorErrorint_or_nonejoin_nonemptytry_geturl_or_noneurlencode_postdatac                   h    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zdd
ZddZd Zd Zd Zd Zy)ZattooPlatformBaseIENc                 T    dt        | d      r| j                  z  S | j                  z  S )Nz
https://%s	_API_HOST)hasattrr   _HOSTselfs    `/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/zattoo.py	_host_urlzZattooPlatformBaseIE._host_url   s)    {1Kt~~\\QUQ[Q[\\    c                 D    | j                   s| j                  dd       y y )Nz)An account is needed to access this mediapassword)method)_power_guide_hashraise_login_requiredr   s    r   _real_initializez%ZattooPlatformBaseIE._real_initialize   s%    %%%%&QZd%e &r   c                 T   	 | j                  | j                          dd dt        ||dd      | j                          ddd      }|d   d   | _        y # t        $ rF}t	        |j
                  t              r&|j
                  j                  d	k(  rt        d
d       d }~ww xY w)Nz/zapi/v2/account/loginz
Logging intrue)loginr   rememberz/loginz0application/x-www-form-urlencoded; charset=UTF-8)RefererzContent-Type)dataheadersi  z3Unable to login: incorrect username and/or passwordT)expectedsessionpower_guide_hash)	_download_jsonr   r   r   
isinstancecauser   statusr   )r   usernamer   r#   es        r   _perform_loginz#ZattooPlatformBaseIE._perform_login   s    	&&>>#$$:;T<'% ( &) 
 #'.."2!36:$V ' 	D" "&i1C!D  	!''9-!''..C2G$I!# # 	s   AA 	B'!AB""B'c                     | j                  | j                          dd d      d   }| j                  | j                          dd dt        t	        t        j                               ddd|d	      
       y )Nz/token.jsonzDownloading session tokensession_tokenz/zapi/v3/session/hellozOpening sessionenz1.8.2json)uuidlangapp_versionformatclient_app_token)r#   )r(   r   _request_webpager   strr3   uuid4)r   r0   s     r   _initialize_pre_loginz*ZattooPlatformBaseIE._initialize_pre_login/   s    ++~~ ,d4OQQ`b 	~~  67$6DJJL)& $18 % 	 	r   c                     | j                  | j                          dd      }	 t        fd|d   D              S # t        t        f$ r t        d      w xY w)Nz/zapi/v2/playlistzDownloading playlistc              3      K   | ]@  }|j                  d       r-t        |j                  d            k(  rt        |d           B yw)
program_ididN)getr9   ).0itemrecids     r   	<genexpr>zHZattooPlatformBaseIE._extract_video_id_from_recording.<locals>.<genexpr>B   sE      L,088L)c$((4..AU.J D&'Ls   AA	
recordingsz)Could not extract video id from recording)r(   r   nextStopIterationKeyErrorr   )r   rC   playlists    ` r    _extract_video_id_from_recordingz5ZattooPlatformBaseIE._extract_video_id_from_recording>   sy    &&~~  12E;QS	N L4<\4JL L L x( 	N !LMM	Ns	   > Ac                    | j                  | j                          d| j                   |dddi      d   }g }|D ]  }|j                  |d           	 t	        fd|D              S # t
        $ r t        d	      w xY w)
Nz/zapi/v2/cached/channels/zDownloading channel listdetailsFquerychannel_groupschannelsc              3      K   | ]B  }|j                  d       r/|j                  d      k(  s|j                  d       k(  r|d     D yw)ciddisplay_aliasN)r@   )rA   chanchannel_names     r   rD   z4ZattooPlatformBaseIE._extract_cid.<locals>.<genexpr>Q   sI      9 $88E?HH_-=xx,6 U9s   AAzCould not extract channel id)r(   r   r   extendrF   rG   r   )r   video_idrU   rO   channel_listchgrps     `   r   _extract_cidz!ZattooPlatformBaseIE._extract_cidH   s    ,,~~  9$:P:P9QR0e$ - & '78 # 	3Ej 12	3	A 9(49 9 9
  	A !?@@	As   A+ +B c                    | j                  | j                          d| j                   |d|dd      }|d   d   }|d   }||j                  d	      xs |d
   |j                  d      |j                  d      |j                  d      |j                  d
      t	        |j                  d            t	        |j                  d            t	        |j                  d            t        |d t              t        |d t              d}||fS )Nz&/zapi/v2/cached/program/power_details/zDownloading video informationT)program_idscompleterM   programsr   rR   tetdi_urlrU   e_nos_noyearc                     | d   S )Nc xs    r   <lambda>zBZattooPlatformBaseIE._extract_cid_and_video_info.<locals>.<lambda>p   s
    qv r   c                     | d   S )Ngrh   ri   s    r   rk   zBZattooPlatformBaseIE._extract_cid_and_video_info.<locals>.<lambda>q   s
    3 r   )r?   titledescription	thumbnailcreatorepisodeepisode_numberseason_numberrelease_year
categoriestags)r(   r   r   r@   r   r
   list)r   rW   r#   prR   	info_dicts         r   _extract_cid_and_video_infoz0ZattooPlatformBaseIE._extract_cid_and_video_infoY   s   ""~~  FtG]G]F^_+' 	 #  Qh UU3Z*1T755:wuu^,uuT{)!%%-8(v7'f6!!%5t<A/6
	 I~r   c                    | j                  | j                          d| |d      }||j                  d      |j                  d      t        |j                  d            t        |j                  d            t        |j                  d            t        |j                  d            t	        |d	 t
              d
}|d   d   d   d   d   |d   |fS )zH
        @returns    (ondemand_token, ondemand_type, info_dict)
        z/zapi/vod/movies/z Downloading ondemand informationrn   ro   durationre   rs   rt   c                     | d   S )Nrv   rh   ri   s    r   rk   z=ZattooPlatformBaseIE._extract_ondemand_info.<locals>.<lambda>   s
    !L/ r   )r?   rn   ro   r}   ru   rs   rt   rv   terms_catalogr   termstokentype)r(   r   r@   r   r
   rx   )r   ondemand_idr#   rz   s       r   _extract_ondemand_infoz+ZattooPlatformBaseIE._extract_ondemand_infov   s     ""~~  1+?;= XXg&88M2#DHHZ$89'(89)$((3C*DE(/)BC!$(A4H	
	 O$Q'03G<d6lIUUr   c           
      p   ddi}|r)|j                  ddi       | j                          d| }	n[|r| j                          d| }	nC|r)|j                  |||d       | j                          d}	n| j                          d	| d
| }	g }
i }dD ]  }|j                         }||d<   | j                  |	|d|j	                          dt        |      d      }|sMt        |d t              }|sb|D ]8  }t        |t              st        |j                  d            }|s2|j                  d      }|dk(  rdnd }t        ||j                  d      |      }|j                  d      r,| j                  |||d      \  }}| j                  ||       nw|j                  d      r.| j!                  ||dd|d      \  }}| j                  ||       n8|dk(  r| j#                  |||d      }n|d k(  r| j%                  |||d!      }nJ |D ]  }||d"<   	 |
j'                  |       ;  |
|fS )#Nhttps_watch_urlsT	timeshifti0*  z/zapi/watch/live/z/zapi/watch/recording/)teasable_id
term_tokenteasable_typez/zapi/watch/vod/videoz/zapi/v3/watch/replay//)dashhls7stream_typezDownloading z formatsF)r#   fatalc                     | d   d   S )Nstream
watch_urlsrh   ri   s    r   rk   z7ZattooPlatformBaseIE._extract_formats.<locals>.<lambda>   s    (L 9 r   urlaudio_channelAr   maxrater   )mpd_idr   )targethlsmp4m3u8_native)entry_protocolm3u8_idr   hds)f4m_idr   smooth_playready)ism_idr   quality)updater   copyr(   upperr   r
   rx   r)   dictr   r@   r	   
startswith"_extract_mpd_formats_and_subtitles_merge_subtitles#_extract_m3u8_formats_and_subtitles_extract_f4m_formats_extract_ism_formatsrV   )r   rR   rW   	record_idr   ondemand_termtokenondemand_typeis_livepostdata_commonr   formats	subtitlesr   postdatar#   r   watch	watch_urlr   
preference	format_idthis_formatssubsthis_formats                           r   _extract_formatsz%ZattooPlatformBaseIE._extract_formats   s   
 ""K#78^^%&&7u=C^^%&&<YKHC""*0!.$ 
 ^^%&&;<C^^%&&<SE8*MC	+ ,	-K&++-H&1H]#&&Xk.?.?.A-B(K'1 ' @D  94AJ# -!%.'		%(89	  %		/ :"/3"6QD
)+uyy7K][	))&1)-)P)P!8IU *Q *L&L$))$y)A ++E2)-)Q)Q!8U'4i# *R *%&L$ ))$y)A E)#'#<#<!8IU $= $LL $66#'#<#<!8IU $= $LL !5#/ 8K-7K	*8|,;-,	-Z 	!!r   c                 h    | j                  |      \  }}| j                  |||      \  |d<   |d<   |S N)r   r   r   )r{   r   )r   rW   r   rR   rz   s        r   _extract_videoz#ZattooPlatformBaseIE._extract_video   sD    99(CY7;7L7LSRZfo7L7p4	)i4r   c                 d    | j                  ||      }| j                  ||d      \  }}||d||dS )NT)r   )r?   rn   r   r   r   )rZ   r   )r   rU   rR   r   r   s        r   _extract_livez"ZattooPlatformBaseIE._extract_live   sI    l;!223T2J!"
 	
r   c                     | j                  |      }| j                  |      \  }}| j                  |||      \  |d<   |d<   |S r   )rJ   r{   r   )r   r   rW   rR   rz   s        r   _extract_recordz$ZattooPlatformBaseIE._extract_record   sT    88C99(CY7;7L7LSRZfo7L7p4	)i4r   c                 n    | j                  |      \  }}}| j                  d ||||      \  |d<   |d<   |S )N)r   r   r   r   r   )r   r   )r   r   r   r   rz   s        r   _extract_ondemandz&ZattooPlatformBaseIE._extract_ondemand   sU    7;7R7RS^7_4M97;7L7L+;1 8M 8P4	)i4 r   c                     | j                  |      j                         \  }} t        | d| j                         |xs |      S )N	_extract_)_match_valid_urlgroupsgetattr_TYPE)r   r   rW   r   s       r   _real_extractz"ZattooPlatformBaseIE._real_extract   sD    "33C8??A)6wty56x7L9MMr   )NNNNFN)__name__
__module____qualname__r   r   r   r.   r;   rJ   rZ   r{   r   r   r   r   r   r   r   rh   r   r   r   r      sW    ]fE*NA":V&B"H
	
Nr   r   c           	      `    |r	d| d| dnd}dt        j                  |        d| d| d| d		S )
N|z
/(?P<vid1>)z
(?P<vid1>)z(?x)https?://(?:www\.)?z /(?:
        [^?#]+\?(?:[^#]+&)?z
=(?P<vid2>z
)
        z
    ))reescape)hostmatchqsbase_re
match_bases        r   _create_valid_urlr      sS    5<AgYjq1,J'		$'8 94z% 1		 	 	r   c                       e Zd ZdZdZy)ZattooBaseIEzattoo
zattoo.comNr   r   r   _NETRC_MACHINEr   rh   r   r   r   r          NEr   r   c                   r    e Zd Z eej
                  ddd      ZdZddddd	d
dddddd
ddidddddddgZy)ZattooIE\d+program(?:program|watch)/[^/]+videoz(https://zattoo.com/program/zdf/250170418	250170418r   zMarkus Lanzz$md5:e41cb1257de008ca62a73bb876ffa7fcz5re:http://images.zattic.com/cms/.+/format_480x360.jpgzZDF HDi  z
Folge 1655zcount:1zcount:2)
r?   extrn   ro   rp   rq   ru   rr   rv   rw   skip_downloadm3u8)r   rz   paramsz-https://zattoo.com/program/daserste/210177916Tr   only_matchingz>https://zattoo.com/guide/german?channel=srf1&program=169860555N	r   r   r   r   r   r   
_VALID_URLr   _TESTSrh   r   r   r   r      su    "<#5#5vyJcdJE9"AP ##
 #F+  ? P%Fr   r   c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	ZattooLiveIE[^/?&#]+channellivez3https://zattoo.com/channels/german?channel=srf_zweiTr   zhttps://zattoo.com/live/srf1c                 P    t         j                  |      rdS t        |   |      S NF)r   suitablesuperclsr   	__class__s     r   r   zZattooLiveIE.suitable"  %     ))#.uIEG4DS4IIr   )r   r   r   r   r   r   r   r   r   classmethodr   __classcell__r   s   @r   r   r     S    "<#5#5{IvVJED .F J Jr   r   c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
ZattooMoviesIEz\w+movie_idz
vod/moviesondemandz"https://zattoo.com/vod/movies/7521Tr   zIhttps://zattoo.com/ondemand?movie_id=7521&term_token=9f00f43183269484eddeNr   rh   r   r   r  r  '  s=    "<#5#5vz<XJE3 [Fr   r  c                   8    e Zd Z eddd      ZdZddddddgZy	)
ZattooRecordingsIEr   r   	recordingrecordz1https://zattoo.com/recordings?recording=193615508Tr   zGhttps://zattoo.com/tc/ptc_recordings_all_recordings?recording=193615420N)r   r   r   r   r   r   r   rh   r   r   r	  r	  3  s5    "<EJEB YFr   r	  c                       e Zd ZdZdZde Zy)NetPlusTVBaseIEnetplusz
netplus.tvwww.Nr   r   r   r   r   r   rh   r   r   r  r  ?  s    NEugIr   r  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
NetPlusTVIEr   r   r   r   z-https://netplus.tv/program/daserste/210177916Tr   z>https://netplus.tv/guide/german?channel=srf1&program=169860555N	r   r   r   r   r  r   r   r   r   rh   r   r   r  r  E  s>    "?#8#8&)MfgJE> PFr   r  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	NetPlusTVLiveIEr   r   r   z3https://netplus.tv/channels/german?channel=srf_zweiTr   zhttps://netplus.tv/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r  r   r   r   s     r   r   zNetPlusTVLiveIE.suitable\  %    #,,S1uLuw7G7LLr   )r   r   r   r   r  r   r   r   r   r   r   r  r  s   @r   r  r  Q  sT    "?#8#8+yRXYJED .F M Mr   r  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	NetPlusTVRecordingsIEr   r
  r  z1https://netplus.tv/recordings?recording=193615508Tr   zGhttps://netplus.tv/tc/ptc_recordings_all_recordings?recording=193615420Nr  rh   r   r   r  r  a  s;    "?#8#8&+NJEB YFr   r  c                       e Zd ZdZdZy)MNetTVBaseIEmnettvztvplus.m-net.deNr   rh   r   r   r  r  m  s    NEr   r  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
MNetTVIEr   r   r   r   z2https://tvplus.m-net.de/program/daserste/210177916Tr   zChttps://tvplus.m-net.de/guide/german?channel=srf1&program=169860555N	r   r   r   r   r  r   r   r   r   rh   r   r   r  r  r  s>    "<#5#5vyJcdJEC UFr   r  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	MNetTVLiveIEr   r   r   z8https://tvplus.m-net.de/channels/german?channel=srf_zweiTr   z!https://tvplus.m-net.de/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r  r   r   r   s     r   r   zMNetTVLiveIE.suitable  r   r   )r   r   r   r   r  r   r   r   r   r   r   r  r  s   @r   r!  r!  ~  sS    "<#5#5{IvVJEI 3F J Jr   r!  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	MNetTVRecordingsIEr   r
  r  z6https://tvplus.m-net.de/recordings?recording=193615508Tr   zLhttps://tvplus.m-net.de/tc/ptc_recordings_all_recordings?recording=193615420Nr  rh   r   r   r$  r$    s;    "<#5#5v{KJEG ^Fr   r$  c                       e Zd ZdZdZy)WalyTVBaseIEwalytvzplayer.waly.tvNr   rh   r   r   r&  r&    s    NEr   r&  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
WalyTVIEr   r   r   r   z1https://player.waly.tv/program/daserste/210177916Tr   zBhttps://player.waly.tv/guide/german?channel=srf1&program=169860555N	r   r   r   r   r&  r   r   r   r   rh   r   r   r)  r)    s>    "<#5#5vyJcdJEB TFr   r)  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	WalyTVLiveIEr   r   r   z7https://player.waly.tv/channels/german?channel=srf_zweiTr   z https://player.waly.tv/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r)  r   r   r   s     r   r   zWalyTVLiveIE.suitable  r   r   )r   r   r   r   r&  r   r   r   r   r   r   r  r  s   @r   r,  r,    sS    "<#5#5{IvVJEH 2F J Jr   r,  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	WalyTVRecordingsIEr   r
  r  z5https://player.waly.tv/recordings?recording=193615508Tr   zKhttps://player.waly.tv/tc/ptc_recordings_all_recordings?recording=193615420Nr*  rh   r   r   r/  r/    s;    "<#5#5v{KJEF ]Fr   r/  c                       e Zd ZdZdZde Zy)BBVTVBaseIEbbvtvz
bbv-tv.netr  Nr  rh   r   r   r1  r1    s    NEugIr   r1  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
BBVTVIEr   r   r   r   z-https://bbv-tv.net/program/daserste/210177916Tr   z>https://bbv-tv.net/guide/german?channel=srf1&program=169860555N	r   r   r   r   r1  r   r   r   r   rh   r   r   r4  r4    s>    ";#4#4fiIbcJE> PFr   r4  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	BBVTVLiveIEr   r   r   z3https://bbv-tv.net/channels/german?channel=srf_zweiTr   zhttps://bbv-tv.net/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r4  r   r   r   s     r   r   zBBVTVLiveIE.suitable  %    ((-uH573CC3HHr   )r   r   r   r   r1  r   r   r   r   r   r   r  r  s   @r   r7  r7    sS    ";#4#4k9fUJED .F I Ir   r7  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	BBVTVRecordingsIEr   r
  r  z1https://bbv-tv.net/recordings?recording=193615508Tr   zGhttps://bbv-tv.net/tc/ptc_recordings_all_recordings?recording=193615420Nr5  rh   r   r   r;  r;    s;    ";#4#4fkJJEB YFr   r;  c                       e Zd ZdZdZde Zy)VTXTVBaseIEvtxtvzvtxtv.chr  Nr  rh   r   r   r=  r=        NEugIr   r=  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
VTXTVIEr   r   r   r   z+https://vtxtv.ch/program/daserste/210177916Tr   z<https://vtxtv.ch/guide/german?channel=srf1&program=169860555N	r   r   r   r   r=  r   r   r   r   rh   r   r   rA  rA    >    ";#4#4fiIbcJE< NFr   rA  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	VTXTVLiveIEr   r   r   z1https://vtxtv.ch/channels/german?channel=srf_zweiTr   zhttps://vtxtv.ch/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )rA  r   r   r   s     r   r   zVTXTVLiveIE.suitable  r9  r   )r   r   r   r   r=  r   r   r   r   r   r   r  r  s   @r   rE  rE    S    ";#4#4k9fUJEB ,F I Ir   rE  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	VTXTVRecordingsIEr   r
  r  z/https://vtxtv.ch/recordings?recording=193615508Tr   zEhttps://vtxtv.ch/tc/ptc_recordings_all_recordings?recording=193615420NrB  rh   r   r   rI  rI    ;    ";#4#4fkJJE@ WFr   rI  c                       e Zd ZdZdZy)GlattvisionTVBaseIEglattvisiontvziptv.glattvision.chNr   rh   r   r   rL  rL  #  s    $N!Er   rL  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
GlattvisionTVIEr   r   r   r   z6https://iptv.glattvision.ch/program/daserste/210177916Tr   zGhttps://iptv.glattvision.ch/guide/german?channel=srf1&program=169860555N	r   r   r   r   rL  r   r   r   r   rh   r   r   rO  rO  (  s?    "#6#<#<fiQjkJEG YFr   rO  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	GlattvisionTVLiveIEr   r   r   z<https://iptv.glattvision.ch/channels/german?channel=srf_zweiTr   z%https://iptv.glattvision.ch/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )rO  r   r   r   s     r   r   zGlattvisionTVLiveIE.suitable?  %    '005uP57;KC;PPr   )r   r   r   r   rL  r   r   r   r   r   r   r  r  s   @r   rR  rR  4  sU    "#6#<#<k9V\]JEM 7F Q Qr   rR  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	GlattvisionTVRecordingsIEr   r
  r  z:https://iptv.glattvision.ch/recordings?recording=193615508Tr   zPhttps://iptv.glattvision.ch/tc/ptc_recordings_all_recordings?recording=193615420NrP  rh   r   r   rV  rV  D  s<    "#6#<#<fkRJEK bFr   rV  c                       e Zd ZdZdZde Zy)SAKTVBaseIEsaktvzsaktv.chr  Nr  rh   r   r   rX  rX  P  r?  r   rX  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
SAKTVIEr   r   r   r   z+https://saktv.ch/program/daserste/210177916Tr   z<https://saktv.ch/guide/german?channel=srf1&program=169860555N	r   r   r   r   rX  r   r   r   r   rh   r   r   r[  r[  V  rC  r   r[  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	SAKTVLiveIEr   r   r   z1https://saktv.ch/channels/german?channel=srf_zweiTr   zhttps://saktv.ch/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r[  r   r   r   s     r   r   zSAKTVLiveIE.suitablem  r9  r   )r   r   r   r   rX  r   r   r   r   r   r   r  r  s   @r   r^  r^  b  rG  r   r^  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	SAKTVRecordingsIEr   r
  r  z/https://saktv.ch/recordings?recording=193615508Tr   zEhttps://saktv.ch/tc/ptc_recordings_all_recordings?recording=193615420Nr\  rh   r   r   ra  ra  r  rJ  r   ra  c                       e Zd ZdZdZy)EWETVBaseIEewetvztvonline.ewe.deNr   rh   r   r   rc  rc  ~  s    NEr   rc  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
EWETVIEr   r   r   r   z2https://tvonline.ewe.de/program/daserste/210177916Tr   zChttps://tvonline.ewe.de/guide/german?channel=srf1&program=169860555N	r   r   r   r   rc  r   r   r   r   rh   r   r   rf  rf    s>    ";#4#4fiIbcJEC UFr   rf  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	EWETVLiveIEr   r   r   z8https://tvonline.ewe.de/channels/german?channel=srf_zweiTr   z!https://tvonline.ewe.de/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )rf  r   r   r   s     r   r   zEWETVLiveIE.suitable  r9  r   )r   r   r   r   rc  r   r   r   r   r   r   r  r  s   @r   ri  ri    sS    ";#4#4k9fUJEI 3F I Ir   ri  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	EWETVRecordingsIEr   r
  r  z6https://tvonline.ewe.de/recordings?recording=193615508Tr   zLhttps://tvonline.ewe.de/tc/ptc_recordings_all_recordings?recording=193615420Nrg  rh   r   r   rl  rl    s;    ";#4#4fkJJEG ^Fr   rl  c                       e Zd ZdZdZde Zy)QuantumTVBaseIE	quantumtvzquantum-tv.comr  Nr  rh   r   r   rn  rn    s     NEugIr   rn  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
QuantumTVIEr   r   r   r   z1https://quantum-tv.com/program/daserste/210177916Tr   zBhttps://quantum-tv.com/guide/german?channel=srf1&program=169860555N	r   r   r   r   rn  r   r   r   r   rh   r   r   rq  rq    s>    "?#8#8&)MfgJEB TFr   rq  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	QuantumTVLiveIEr   r   r   z7https://quantum-tv.com/channels/german?channel=srf_zweiTr   z https://quantum-tv.com/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )rq  r   r   r   s     r   r   zQuantumTVLiveIE.suitable  r  r   )r   r   r   r   rn  r   r   r   r   r   r   r  r  s   @r   rt  rt    sT    "?#8#8+yRXYJEH 2F M Mr   rt  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	QuantumTVRecordingsIEr   r
  r  z5https://quantum-tv.com/recordings?recording=193615508Tr   zKhttps://quantum-tv.com/tc/ptc_recordings_all_recordings?recording=193615420Nrr  rh   r   r   rw  rw    s;    "?#8#8&+NJEF ]Fr   rw  c                       e Zd ZdZdZy)OsnatelTVBaseIE	osnateltvztvonline.osnatel.deNr   rh   r   r   ry  ry    s     N!Er   ry  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
OsnatelTVIEr   r   r   r   z6https://tvonline.osnatel.de/program/daserste/210177916Tr   zGhttps://tvonline.osnatel.de/guide/german?channel=srf1&program=169860555N	r   r   r   r   ry  r   r   r   r   rh   r   r   r|  r|    s>    "?#8#8&)MfgJEG YFr   r|  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	OsnatelTVLiveIEr   r   r   z<https://tvonline.osnatel.de/channels/german?channel=srf_zweiTr   z%https://tvonline.osnatel.de/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r|  r   r   r   s     r   r   zOsnatelTVLiveIE.suitable  r  r   )r   r   r   r   ry  r   r   r   r   r   r   r  r  s   @r   r  r    sT    "?#8#8+yRXYJEM 7F M Mr   r  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	OsnatelTVRecordingsIEr   r
  r  z:https://tvonline.osnatel.de/recordings?recording=193615508Tr   zPhttps://tvonline.osnatel.de/tc/ptc_recordings_all_recordings?recording=193615420Nr}  rh   r   r   r  r    s;    "?#8#8&+NJEK bFr   r  c                       e Zd ZdZdZde Zy)EinsUndEinsTVBaseIE1und1tvz1und1.tvr  Nr  rh   r   r   r  r    s    NEugIr   r  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
EinsUndEinsTVIEr   r   r   r   z+https://1und1.tv/program/daserste/210177916Tr   z<https://1und1.tv/guide/german?channel=srf1&program=169860555N	r   r   r   r   r  r   r   r   r   rh   r   r   r  r    s?    "#6#<#<fiQjkJE< NFr   r  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	EinsUndEinsTVLiveIEr   r   r   z1https://1und1.tv/channels/german?channel=srf_zweiTr   zhttps://1und1.tv/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r  r   r   r   s     r   r   zEinsUndEinsTVLiveIE.suitable#  rT  r   )r   r   r   r   r  r   r   r   r   r   r   r  r  s   @r   r  r    sU    "#6#<#<k9V\]JEB ,F Q Qr   r  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	EinsUndEinsTVRecordingsIEr   r
  r  z/https://1und1.tv/recordings?recording=193615508Tr   zEhttps://1und1.tv/tc/ptc_recordings_all_recordings?recording=193615420Nr  rh   r   r   r  r  (  s<    "#6#<#<fkRJE@ WFr   r  c                       e Zd ZdZdZy)SaltTVBaseIEsalttvz
tv.salt.chNr   rh   r   r   r  r  4  r   r   r  c                   N    e Zd Z eej
                  ddd      ZdZddddddgZy	)
SaltTVIEr   r   r   r   z-https://tv.salt.ch/program/daserste/210177916Tr   z>https://tv.salt.ch/guide/german?channel=srf1&program=169860555N	r   r   r   r   r  r   r   r   r   rh   r   r   r  r  9  s>    "<#5#5vyJcdJE> PFr   r  c                   j     e Zd Z eej
                  ddd      ZdZddddddgZe	 fd       Z
 xZS )	SaltTVLiveIEr   r   r   z3https://tv.salt.ch/channels/german?channel=srf_zweiTr   zhttps://tv.salt.ch/live/srf1c                 P    t         j                  |      rdS t        |   |      S r   )r  r   r   r   s     r   r   zSaltTVLiveIE.suitableP  r   r   )r   r   r   r   r  r   r   r   r   r   r   r  r  s   @r   r  r  E  r  r   r  c                   L    e Zd Z eej
                  dd      ZdZddddddgZy)	SaltTVRecordingsIEr   r
  r  z1https://tv.salt.ch/recordings?recording=193615508Tr   zGhttps://tv.salt.ch/tc/ptc_recordings_all_recordings?recording=193615420Nr  rh   r   r   r  r  U  s;    "<#5#5v{KJEB YFr   r  r   )Dr   r3   commonr   networking.exceptionsr   utilsr   r   r	   r
   r   r   r   r   r   r   r   r  r	  r  r  r  r  r  r  r!  r$  r&  r)  r,  r/  r1  r4  r7  r;  r=  rA  rE  rI  rL  rO  rR  rV  rX  r[  r^  ra  rc  rf  ri  rl  rn  rq  rt  rw  ry  r|  r  r  r  r  r  r  r  r  r  r  rh   r   r   <module>r     s   	  ! - \N= \N~	' 
| 6J< J 	\ 		 	* 	/ 	Mo M 	O 	' 
	| 	J< J 	 	' 
	| 	J< J 	 	& 	k 	I+ I 	 	& 	k 	I+ I 	 	". "
	) 	Q- Q 	 3 	& 	k 	I+ I 	 	& 
	k 	I+ I 	 	* 	/ 	Mo M 	O 	"* "
	/ 	Mo M 	O 	. 	) 	Q- Q 	 3 	' 
	| 	J< J 	 	r   