
    VGh0	                     D    d dl Z ddlmZ  G d de      Z G d de      Zy)    N   )InfoExtractorc                   2    e Zd ZdZdZddddddd	d
dZd Zy)SoundgasmIE	soundgasmz[https?://(?:www\.)?soundgasm\.net/u/(?P<user>[0-9a-zA-Z_-]+)/(?P<display_id>[0-9a-zA-Z_-]+)z(http://soundgasm.net/u/ytdl/Piano-sample 010082a2c802c5275bb00030743e75ad(88abd86ea000cafe98f96321b23cc1206cbcbcc9m4azPiano samplezRoyalty Free Sample Musicytdl)idexttitledescriptionuploader)urlmd5	info_dictc           	      D   | j                  |      }|j                  d      }| j                  ||      }| j                  d|dd      }| j	                  d|d|      }| j                  d	|d
d      }| j	                  d|d|      }|||d|||j                  d      dS )N
display_idz,(?s)m4a\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1z	audio URLr   )groupz+<div[^>]+\bclass=["\']jp-title[^>]+>([^<]+)r   )default)z9(?s)<div[^>]+\bclass=["\']jp-description[^>]+>(.+?)</div>z!(?s)<li>Description:\s(.*?)<\/li>r   F)fatalz/([^/]+)\.m4azaudio idnoneuser)r   r   r   vcodecr   r   r   )_match_valid_urlr   _download_webpage_html_search_regex_search_regex)	selfr   mobjr   webpage	audio_urlr   r   audio_ids	            c/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/soundgasm.py_real_extractzSoundgasmIE._real_extract   s    $$S)ZZ-
((j9++;Wu , &	 "":Wj # 2 --3]% . 1
 %%iZ & I $&

6*
 	
    N__name__
__module____qualname__IE_NAME
_VALID_URL_TESTr&    r'   r%   r   r      s2    GoJ91<#6

E
r'   r   c                   *    e Zd ZdZdZdddiddZd Zy	)
SoundgasmProfileIEzsoundgasm:profilez=https?://(?:www\.)?soundgasm\.net/u/(?P<id>[^/]+)/?(?:\#.*)?$zhttp://soundgasm.net/u/ytdlr   r   r   )r   r   playlist_countc                     | j                  |      }| j                  ||      }t        j                  d| d|      D cg c]  }| j	                  |d       }}| j                  ||      S c c}w )Nzhref="([^"]+/u/z/[^"]+)	Soundgasm)	_match_idr   refindall
url_resultplaylist_result)r    r   
profile_idr"   r#   entriess         r%   r&   z SoundgasmProfileIE._real_extractA   s    ^^C(
((j9  ZZ?:,g(NPWXZ OOI{3Z Z ##GZ88	Zs    A-Nr(   r/   r'   r%   r1   r1   6   s*    !GQJ,&
 E	9r'   r1   )r6   commonr   r   r1   r/   r'   r%   <module>r=      s$    	 !-
- -
`9 9r'   