o
    i^                     @   s<   d dl mZ ddlmZ G dd deZG dd deZdS )	   )YoutubeBaseInfoExtractor   ExtractorErrorc                   @   sT   e Zd ZdZdZdZdddddddddd	ddd
dddddgZdd ZdS )YoutubeTruncatedURLIEzyoutube:truncated_urlFaX  (?x)
        (?:https?://)?
        (?:\w+\.)?[yY][oO][uU][tT][uU][bB][eE](?:-nocookie)?\.com/
        (?:watch\?(?:
            feature=[a-z_]+|
            annotation_id=annotation_[^&]+|
            x-yt-cl=[0-9]+|
            hl=[^&]*|
            t=[0-9]+
        )?
        |
            attribution_link\?a=[^&]+
        )
        $
    zAhttps://www.youtube.com/watch?annotation_id=annotation_3951667041Turlonly_matchingzhttps://www.youtube.com/watch?z.https://www.youtube.com/watch?x-yt-cl=84503534z)https://www.youtube.com/watch?feature=fooz&https://www.youtube.com/watch?hl=en-GBz$https://www.youtube.com/watch?t=2372c                 C   s   t ddd)NzDid you forget to quote the URL? Remember that & is a meta character in most shells, so you want to put the URL in quotes, like  yt-dlp "https://www.youtube.com/watch?feature=foo&v=BaW_jenozKc"  or simply  yt-dlp BaW_jenozKc  .Texpectedr   )selfr    r   V/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/youtube/_mistakes.py_real_extract-   s   z#YoutubeTruncatedURLIE._real_extractN__name__
__module____qualname__IE_NAMEIE_DESC
_VALID_URL_TESTSr   r   r   r   r   r      s0    r   c                   @   s,   e Zd ZdZdZdZdddgZdd Zd	S )
YoutubeTruncatedIDIEzyoutube:truncated_idFzEhttps?://(?:www\.)?youtube\.com/watch\?v=(?P<id>[0-9A-Za-z_-]{1,10})$z*https://www.youtube.com/watch?v=N_708QY7ObTr   c                 C   s$   |  |}td| d| ddd)NzIncomplete YouTube ID z. URL z looks truncated.Tr
   )	_match_idr   )r   r   video_idr   r   r   r   A   s
   
z"YoutubeTruncatedIDIE._real_extractNr   r   r   r   r   r   7   s    r   N)_baser   utilsr   r   r   r   r   r   r   <module>   s   1