
    OJni                     >    d dl mZ ddlmZ ddlmZ  G d de      Zy)   )
StreamData   )BaseLiveStream)PiaopaioLiveStreamc                   r     e Zd ZdZddedz  dedz  f fdZddededefd	Zdd
edee	z  dz  de
fdZ xZS )HuamaoLiveStreamzM
    A class for fetching and processing Huamao live stream information.
    N
proxy_addrcookiesc                 r    t         |   ||       t        | j                  | j                        | _        y )N)r	   r
   )super__init__r   r	   r
   stream)selfr	   r
   	__class__s      W/home/uftp/myenv/lib/python3.12/site-packages/streamget/platforms/huamao/live_stream.pyr   zHuamaoLiveStream.__init__
   s(    W-(DOOT\\Z    urlprocess_datareturnc                 T   K   | j                   j                  |       d{   S 7 w)a)  
        Fetches web stream data for a live room.

        Args:
            url (str): The room URL.
            process_data (bool): Whether to process the data. Defaults to True.

        Returns:
            dict: A dictionary containing anchor name, live status, room URL, and title.
        N)r   fetch_web_stream_data)r   r   r   s      r   r   z&HuamaoLiveStream.fetch_web_stream_data   s#      [[66s;;;;s   (&(	json_datavideo_qualityc                 b   K   |ddiz  }| j                   j                  |       d{   S 7 w)z_
        Fetches the stream URL for a live room and wraps it into a StreamData object.
        platformu   花猫直播N)r   fetch_stream_url)r   r   r   s      r   r   z!HuamaoLiveStream.fetch_stream_url   s2      	j.11	[[11)<<<<s   &/-/)NN)T)N)__name__
__module____qualname____doc__strr   booldictr   intr   r   __classcell__)r   s   @r   r   r      sf    [3: [sTz [<s <$ <RV <= =S3YQUEU =ak =r   r   N)datar   baser   piaopiao.live_streamr   r    r   r   <module>r*      s     ! 5=~ =r   