
    VGh                     >    d dl Z ddlmZ ddlmZmZ  G d de      Zy)    N   )InfoExtractor   )ExtractorErrortraverse_objc                   2    e Zd ZdZddddedddd	d
gZd Zy)	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           
         | j                  |      }| j                  ||| j                               }| j                  d| |ddt	        j
                  dd       i| j                               }|st        d      |j                  d	      rt        d
d      |j                  d      st        dd      t        |dt              }t        |dt              }g }t        |d      D ]&  }| j                  d| d| d| |dddd      }|s& n |s| j                  dd       || j                  |      | j                  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	            a/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/camsoda.py_real_extractzCamsodaIE._real_extract   s   >>#&((h@]@]@_(`""6xjA8(8(8(F'GHI113 # 5  !KLLXX'( !<tLL-( !4tDD"4cJT7#>"4)>? 	F006(!K=0EeWMeU%d 1 LG 	 !!";d!K --g611-RV1W
 	
    N)__name__
__module____qualname__
_VALID_URLr/   _TESTSr:    r;   r9   r	   r	      s7    =J1Y
 " F#
r;   r	   )r,   commonr   utilsr   r   r	   rA   r;   r9   <module>rD      s     ! 02
 2
r;   