
    VGh                     ^    d dl mZ ddlmZ  G d de      Z G d de      Z G d d	e      Zy
)   )InfoExtractor   )int_or_nonec                       e Zd Zd Zy)AudiodraftBaseIEc                 d   | j                  d|dddd| j                               }t        |d         |j                  d      |d	   d
d|j                  d      |j                  d      |j                  d      t	        |j                  d            t	        |j                  d            d
S )NzFhttps://www.audiodraft.com/scripts/general/player/getPlayerInfoNew.phpz0application/x-www-form-urlencoded; charset=UTF-8XMLHttpRequest)zContent-typezX-Requested-Withzid=)headersdataentry_identry_titlepathnonemp3designer_namedesigner_id	entry_urlentry_likesentry_rating)
idtitleurlvcodecextuploaderuploader_idwebpage_url
like_countaverage_rating)_download_jsonencodestrgetr   )selfplayer_entry_id	data_jsons      d/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/audiodraft.py_audiodraft_extract_from_idz,AudiodraftBaseIE._audiodraft_extract_from_id   s    ''TVe R$4 /*+224 ( 6	 i
+,]]=1V$!o6$==7$==5%immM&BC))--*GH
 	
    N)__name__
__module____qualname__r(    r)   r'   r   r      s    
r)   r   c                   f    e Zd ZdZdZddddddd	ed
dddddddd	ed
dddddddd	ed
dgZd Zy)AudiodraftCustomIEzAudiodraft:customz6https?://(?:[-\w]+)\.audiodraft\.com/entry/(?P<id>\d+)z*http://nokiatune.audiodraft.com/entry/58749485r   zHula Hula Calls	unclemaki13512   r   r   r   r   r   r   r   r   	info_dictz+http://vikinggrace.audiodraft.com/entry/50122241z	MVG Happyfrog19142z*http://timferriss.audiodraft.com/entry/76519710ferris03malex17335c                     | j                  |      }| j                  ||      }| j                  d||d      }| j                  |      S )Nz$playAudio\(\'(player_entry_\d+)\'\);zplay entry id)	_match_id_download_webpage_search_regexr(   )r$   r   video_idwebpager%   s        r'   _real_extractz AudiodraftCustomIE._real_extractC   sM    >>#&((h7,,3WhY//@@r)   Nr*   r+   r,   IE_NAME
_VALID_URLint_TESTSrD   r-   r)   r'   r/   r/      s    !GJJ <&#"
 = "
 <"
-!FFAr)   r/   c            	       6    e Zd ZdZdZddddddd	ed
dgZd Zy)AudiodraftGenericIEzAudiodraft:genericzEhttps?://www\.audiodraft\.com/contests/[^/#]+#entries&eid=(?P<id>\d+)zShttps://www.audiodraft.com/contests/570-Score-A-Video-Surprise-Us#entries&eid=3013830138r   zDROP in sound_V2
TiagoSilva19452   r4   r5   c                 L    | j                  |      }| j                  d|       S )Nplayer_entry_)r?   r(   )r$   r   rB   s      r'   rD   z!AudiodraftGenericIE._real_extract\   s(    >>#&//-z0JKKr)   NrE   r-   r)   r'   rK   rK   K   s>    "GYJ e'$"
 FLr)   rK   N)commonr   utilsr   r   r/   rK   r-   r)   r'   <module>rT      s6    ! 
} 
.,A) ,A^L* Lr)   