
    V|h                     >    S SK r SSKJr  SSKJrJr   " S S\5      rg)    N   )InfoExtractor   )ExtractorErrortraverse_objc                   :    \ rS rSrSrSSSS\SSS	.S
S./rS rSrg)	CamsodaIE   z)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           
         U R                  U5      nU R                  XU R                  5       S9nU R                  SU 3USS[        R
                  " SS5       30U R                  5       S9nU(       d  [        S5      eUR                  S	5      (       a
  [        S
SS9eUR                  S5      (       d
  [        SSS9e[        US[        S9n[        US[        S9n/ n[        US5       H)  nU R                  SU SU SU 3USSSSS9nU(       d  M)    O   U(       d  U R                  SSS9  UU R                  U5      U R                  SUS S9SUS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	            R/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/camsoda.py_real_extractCamsodaIE._real_extract   s   >>#&((@]@]@_(`""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 w @ !!";d!K --g611-RV1W
 	
     N)	__name__
__module____qualname____firstlineno__
_VALID_URLr0   _TESTSr;   __static_attributes__r>   r=   r:   r	   r	      s7    =J1Y
 " F#
r=   r	   )r-   commonr   utilsr   r   r	   r>   r=   r:   <module>rH      s     ! 02
 2
r=   