
    yfr                        d dl Z d dlZddlm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dud
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/ d0e"      Z# G d1 d2e"      Z$ G d3 d4e"      Z% G d5 d6e      Z& G d7 d8e&      Z' G d9 d:e&      Z( G d; d<e&      Z) G d= d>e      Z* G d? d@e*      Z+ G dA dBe*      Z, G dC dDe*      Z- G dE dFe      Z. G dG dHe.      Z/ G dI dJe.      Z0 G dK dLe.      Z1 G dM dNe      Z2 G dO dPe2      Z3 G dQ dRe2      Z4 G dS dTe2      Z5 G dU dVe      Z6 G dW dXe6      Z7 G dY dZe6      Z8 G d[ d\e6      Z9 G d] d^e      Z: G d_ d`e:      Z; G da dbe:      Z< G dc dde:      Z= G de dfe      Z> G dg dhe>      Z? G di dje>      Z@ G dk dle>      ZA G dm dne      ZB G do dpeB      ZC G dq dreB      ZD G ds dteB      ZEy)v    N   )InfoExtractor   )
compat_str)	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    9/usr/lib/python3/dist-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                  d| j                         z  d dt        ||dd      d| j                         z  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%s/zapi/v2/account/loginz
Logging intrue)loginr   rememberz%s/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^^-==t\'% ( &) 
  *DNN,<<$V ' 	D" "&i1C!D  	!''9-!''..C2G$I!# # 	s   AA 	B'!AB""B'c                     | j                  | j                          dd d      d   }| j                  d| j                         z  d dt        t	        t        j                               ddd|d	      
       y )Nz/token.jsonzDownloading session tokensession_tokenz%s/zapi/v3/session/hellozOpening sessionenz1.8.2json)uuidlangapp_versionformatclient_app_token)r$   )r)   r   _request_webpager   r   r4   uuid4)r   r1   s     r   _initialize_pre_loginz*ZattooPlatformBaseIE._initialize_pre_login0   s    ++~~ ,d4OQQ`b 	&)994$6"4::<0& $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)getstr).0itemrecids     r   	<genexpr>zHZattooPlatformBaseIE._extract_video_id_from_recording.<locals>.<genexpr>C   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   rD   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@   )rB   chanchannel_names     r   rE   z4ZattooPlatformBaseIE._extract_cid.<locals>.<genexpr>S   sI      9 $88E?HH_-=xx,6 U9s   AAzCould not extract channel id)r)   r   r   extendrG   rH   r   )r   video_idrV   rP   channel_listchgrps     `   r   _extract_cidz!ZattooPlatformBaseIE._extract_cidI   s    ,,/3~~/?/3/E/EG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completerN   programsr   rS   tetdi_urlrV   e_nos_noyearc                     | d   S )Nc xs    r   <lambda>zBZattooPlatformBaseIE._extract_cid_and_video_info.<locals>.<lambda>s   s
    qv r   c                     | d   S )Ngri   rj   s    r   rl   zBZattooPlatformBaseIE._extract_cid_and_video_info.<locals>.<lambda>t   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   rX   r$   prS   	info_dicts         r   _extract_cid_and_video_infoz0ZattooPlatformBaseIE._extract_cid_and_video_info[   s    "" $"8"8:+'  #  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 informationro   rp   durationrf   rt   ru   c                     | d   S )Nrw   ri   rj   s    r   rl   z=ZattooPlatformBaseIE._extract_ondemand_info.<locals>.<lambda>   s
    !L/ r   )r?   ro   rp   r~   rv   rt   ru   rw   terms_catalogr   termstokentype)r)   r   r@   r	   r   ry   )r   ondemand_idr$   r{   s       r   _extract_ondemand_infoz+ZattooPlatformBaseIE._extract_ondemand_infoy   s     ""'+~~'7E;= XXg&88M2#DHHZ$89'(89)$((3C*DE(/)BC!$(A4H	
	 O$Q'03G<d6lIUUr   c           
      n   ddi}|r)|j                  ddi       | j                         d|}	n[|r| j                         d|}	nC|r)|j                  |||d       d| j                         z  }	n| j                         d	|d
|}	g }
i }dD ]  }|j                         }||d<   | j                  |	|d|j	                         z  t        |      d      }|sLt        |d t              }|sa|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%s/zapi/watch/vod/videoz/zapi/v3/watch/replay//)dashhls7stream_typezDownloading %s formatsF)r$   fatalc                     | d   d   S )Nstream
watch_urlsri   rj   s    r   rl   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   ry   r*   dictr   r@   r
   
startswith"_extract_mpd_formats_and_subtitles_merge_subtitles#_extract_m3u8_formats_and_subtitles_extract_f4m_formats_extract_ism_formatsrW   )r   rS   rX   	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-1^^-=sCC26..2BINC""*0!.$ 
 ,dnn.>>C59^^5EsHUC	+ ,	-K&++-H&1H]#&&X7+:K:K:MM'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   rX   r   rS   r{   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?   ro   r   r   r   )r[   r   )r   rV   rS   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   )rK   r|   r   )r   r   rX   rS   r{   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   r{   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   rX   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;   rK   r[   r|   r   r   r   r   r   r   r   ri   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   ri   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?   extro   rp   rq   rr   rv   rs   rw   rx   skip_downloadm3u8)r   r{   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   _TESTSri   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   ri   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   ri   r   r   r
  r
  6  s5    "<EJEB YFr   r
  c                       e Zd ZdZdZdez  Zy)NetPlusTVBaseIEnetplusz
netplus.tvwww.%sNr   r   r   r   r   r   ri   r   r   r  r  B  s    NE5 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   ri   r   r   r  r  H  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  T  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  ri   r   r   r  r  d  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   ri   r   r   r  r  p  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   ri   r   r   r  r  u  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   ri   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   ri   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   ri   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+  ri   r   r   r0  r0    s;    "<#5#5v{KJEF ]Fr   r0  c                       e Zd ZdZdZdez  Zy)BBVTVBaseIEbbvtvz
bbv-tv.netr  Nr  ri   r   r   r2  r2    s    NE5 Ir   r2  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   r2  r   r   r   r   ri   r   r   r5  r5    s>    ";#4#4fiIbcJE> PFr   r5  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   )r5  r   r   r   s     r   r   zBBVTVLiveIE.suitable  %    ((-uH573CC3HHr   )r   r   r   r   r2  r   r   r   r   r  r   r  r  s   @r   r8  r8    sS    ";#4#4k9fUJED .F I Ir   r8  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=193615420Nr6  ri   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  Zy)VTXTVBaseIEvtxtvzvtxtv.chr  Nr  ri   r   r   r>  r>        NE5 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   ri   r   r   rB  rB    >    ";#4#4fiIbcJE< NFr   rB  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   )rB  r   r   r   s     r   r   zVTXTVLiveIE.suitable  r:  r   )r   r   r   r   r>  r   r   r   r   r  r   r  r  s   @r   rF  rF  
  S    ";#4#4k9fUJEB ,F I Ir   rF  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=193615420NrC  ri   r   r   rJ  rJ    ;    ";#4#4fkJJE@ WFr   rJ  c                       e Zd ZdZdZy)GlattvisionTVBaseIEglattvisiontvziptv.glattvision.chNr   ri   r   r   rM  rM  &  s    $N!Er   rM  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   rM  r   r   r   r   ri   r   r   rP  rP  +  s?    "#6#<#<fiQjkJEG YFr   rP  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   )rP  r   r   r   s     r   r   zGlattvisionTVLiveIE.suitableB  %    '005uP57;KC;PPr   )r   r   r   r   rM  r   r   r   r   r  r   r  r  s   @r   rS  rS  7  sU    "#6#<#<k9V\]JEM 7F Q Qr   rS  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=193615420NrQ  ri   r   r   rW  rW  G  s<    "#6#<#<fkRJEK bFr   rW  c                       e Zd ZdZdZdez  Zy)SAKTVBaseIEsaktvzsaktv.chr  Nr  ri   r   r   rY  rY  S  r@  r   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	)
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   rY  r   r   r   r   ri   r   r   r\  r\  Y  rD  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.suitablep  r:  r   )r   r   r   r   rY  r   r   r   r   r  r   r  r  s   @r   r_  r_  e  rH  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]  ri   r   r   rb  rb  u  rK  r   rb  c                       e Zd ZdZdZy)EWETVBaseIEewetvztvonline.ewe.deNr   ri   r   r   rd  rd    s    NEr   rd  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   rd  r   r   r   r   ri   r   r   rg  rg    s>    ";#4#4fiIbcJEC UFr   rg  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   )rg  r   r   r   s     r   r   zEWETVLiveIE.suitable  r:  r   )r   r   r   r   rd  r   r   r   r   r  r   r  r  s   @r   rj  rj    sS    ";#4#4k9fUJEI 3F I Ir   rj  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=193615420Nrh  ri   r   r   rm  rm    s;    ";#4#4fkJJEG ^Fr   rm  c                       e Zd ZdZdZdez  Zy)QuantumTVBaseIE	quantumtvzquantum-tv.comr  Nr  ri   r   r   ro  ro    s     NE5 Ir   ro  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   ro  r   r   r   r   ri   r   r   rr  rr    s>    "?#8#8&)MfgJEB TFr   rr  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   )rr  r   r   r   s     r   r   zQuantumTVLiveIE.suitable  r  r   )r   r   r   r   ro  r   r   r   r   r  r   r  r  s   @r   ru  ru    sT    "?#8#8+yRXYJEH 2F M Mr   ru  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=193615420Nrs  ri   r   r   rx  rx    s;    "?#8#8&+NJEF ]Fr   rx  c                       e Zd ZdZdZy)OsnatelTVBaseIE	osnateltvztvonline.osnatel.deNr   ri   r   r   rz  rz    s     N!Er   rz  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   rz  r   r   r   r   ri   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   rz  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~  ri   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  Zy)EinsUndEinsTVBaseIE1und1tvz1und1.tvr  Nr  ri   r   r   r  r  	  s    NE5 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   ri   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&  rU  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  ri   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   ri   r   r   r  r  7  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   ri   r   r   r  r  <  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.suitableS  r   r   )r   r   r   r   r  r   r   r   r   r  r   r  r  s   @r   r  r  H  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  ri   r   r   r  r  X  s;    "<#5#5v{KJEB YFr   r  r   )Fr   r4   commonr   compatr   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-  r0  r2  r5  r8  r<  r>  rB  rF  rJ  rM  rP  rS  rW  rY  r\  r_  rb  rd  rg  rj  rm  ro  rr  ru  rx  rz  r}  r  r  r  r  r  r  r  r  r  r  ri   r   r   <module>r     s   	  !  - ^N= ^NB	' 
| 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   