
    Ği                     F    d dl Z ddlmZ ddlmZmZ  G d de          ZdS )    N   )InfoExtractor   )ExtractorErrortraverse_objc                   4    e Zd ZdZddddedddd	d
gZd ZdS )	CamsodaIEz)https?://www\.camsoda\.com/(?P<id>[\w-]+)z https://www.camsoda.com/lizzhopflizzhopfmp4zBlizzhopf (lizzhopf) Nude on Cam. Free Live Sex Chat Room - CamSodaT   )idexttitledescriptionis_live	age_limitzRoom is offline)url	info_dictskipc           
      2   |                      |          }|                     |||                                           }|                     d| |ddt	          j        dd           i|                                           }|st          d          |                    d	          rt          d
d          |                    d          st          dd          t          |dt                    }t          |dt                    }g }t          |d          D ]*}| 
                    d| d| d| |dddd          }|r n+|s|                     dd           ||                     |          |                     d|d           d|ddS )N)headersz(https://camsoda.com/api/v1/video/vtoken/usernameguest_i'  i )queryr   z(Unable to find configuration for stream.private_serverszModel is in private show.T)expectedstream_namezModel is offline.)expected_typetoken)edge_servers.zhttps:///z_v1/index.m3u8?token=r   hlsF)r   m3u8_idfatallivezNo active streams foundr   )defaultr   )r   r   r   r   formatsr   )	_match_id_download_webpagegeo_verification_headers_download_jsonrandom	randranger   getr   str_extract_m3u8_formatsraise_no_formats_html_extract_title_html_search_meta)	selfr   video_idwebpagedatar   r   r'   servers	            ]C:\Users\betacode\Desktop\descargarYoutube\venv\Lib\site-packages\yt_dlp/extractor/camsoda.py_real_extractzCamsodaIE._real_extract   s   >>#&&((h@]@]@_@_(``""AxAA8H(8(F(FHHI1133 # 5 5  	E !KLLLXX'(( 	E !<tLLLL-(( 	E !4tDDDD"4cJJJT7#>>>"4)>?? 	 	F00M6MMKMMeMMeU%d 1 L LG   	L!!";d!KKK --g6611-RV1WW
 
 	
    N)__name__
__module____qualname__
_VALID_URLr/   _TESTSr:    r;   r9   r	   r	      s]        =J1Y
 
 "  F#
 #
 #
 #
 #
r;   r	   )r,   commonr   utilsr   r   r	   rA   r;   r9   <module>rD      sl     ! ! ! ! ! ! 0 0 0 0 0 0 0 02
 2
 2
 2
 2
 2
 2
 2
 2
 2
r;   