
    VGh                     6    d dl mZ ddlmZmZ  G d de      Zy)   )InfoExtractor   )ExtractorErrorurlencode_postdatac                   B    e Zd ZdZdddddddd	d
dddddddgZd Zy)BigoIEz8https?://(?:www\.)?bigo\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)z https://www.bigo.tv/ja/2213386326576287577575737440u*   土よ〜💁‍♂️ 休憩室/REST roomzre:https?://.+u   ✨Shin💫	221338632T)idtitle	thumbnailuploaderuploader_idis_live
livestream)url	info_dictskipz"https://www.bigo.tv/th/Tarlerm1304)r   only_matchingzhttps://bigo.tv/115976881c           	         | j                  |      }| j                  d|t        d|i      ddi      }t        |t              st        d      |j                  d      r;t        dj                  |j                  d	      |j                  d            d
      |j                  d      xs i }|j                  d      st        dd
      | j                  |j                  d      |dd      \  }}|j                  d      xs ||j                  d      xs |j                  d      xs ||||j                  d      |j                  d      |d
dS )Nz@https://ta.bigo.tv/official_website/studio/getInternalStudioInfositeIdAcceptzapplication/json)dataheaderszReceived invalid JSON datacodezBigo says: {} (code {})msgT)expectedr   alivezThis user is offline.hls_srcmp4m3u8roomId	roomTopic	nick_namesnapshot)r   r   formats	subtitlesr   r   r   r   )		_match_id_download_jsonr   
isinstancedictr   getformat#_extract_m3u8_formats_and_subtitles)selfr   user_idinfo_rawinfor&   subss          ^/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/bigo.py_real_extractzBigoIE._real_extract   sM   ..%&&N,h-@A12 ' 4
 (D) !=>><< )00e1DhllSYFZ[fjl l||F#)rxx  !84HH@@HHY%9 ((8$/XXk*Ndhh{.CNw*--"	
 		
    N)__name__
__module____qualname__
_VALID_URL_TESTSr5    r6   r4   r   r      sS    LJ 2'A*%&
  4 +F&
r6   r   N)commonr   utilsr   r   r   r<   r6   r4   <module>r?      s    ! 64
] 4
r6   