U
    $Pf
                     @   s4   d dl mZ d dlZddlmZ G dd deZdS )    )unicode_literalsN   )InfoExtractorc                   @   s2   e Zd ZdZdZddddddd	d
Zdd ZdS )TrailerAddictIEFz_(?:https?://)?(?:www\.)?traileraddict\.com/(?:trailer|clip)/(?P<movie>.+?)/(?P<trailer_name>.+)z=http://www.traileraddict.com/trailer/prince-avalanche/trailerZ 41365557f3c8c397d091da510e73ceb4Z76184Zmp4zPrince Avalanche TrailerzTrailer for Prince Avalanche.

Two highway road workers spend the summer of 1988 away from their city lives. The isolated landscape becomes a place of misadventure as the men find themselves at odds with each other and the women they left behind.)idexttitledescription)urlmd5Z	info_dictc                 C   s   t | j|}|dd |d }| ||}| d|ddd}| jd|d	d
d}|d krfd nt|dd}| d|d}t d|rd}	nd}	d|	t	|f }
| |
|d}| d|ddd}| d|d}| j
d|dd
d}||||||dS )NZmovie/Ztrailer_namez<title>(.+?)</title>zvideo titlez - Trailer Addict z'<span class="views_n">([0-9,.]+)</span>z
view countF)fatal,z2<param\s+name="movie"\s+value="/emb/([0-9]+)"\s*/>zvideo idzfunction (no)?watchplus()Zfvarhdfvarz*http://www.traileraddict.com/%s.php?tid=%szDownloading the info webpagez&fileurl=(.+)zDownload urlz%3F?z&image=(.+?)&zthumbnail urlzK(?s)<div class="synopsis">.*?<div class="movie_label_info"[^>]*>(.*?)</div>r	   )r   r
   r   Z	thumbnailr	   
view_count)rematch
_VALID_URLgroupZ_download_webpageZ_search_regexreplaceintsearchstrZ_html_search_regex)selfr
   ZmobjnameZwebpager   Zview_count_strr   Zvideo_idr   Zinfo_urlZinfo_webpageZ	final_urlZthumbnail_urlr	    r   F/tmp/pip-unpacked-wheel-7zdooeg3/youtube_dl/extractor/traileraddict.py_real_extract   sj              zTrailerAddictIE._real_extractN)__name__
__module____qualname__Z_WORKINGr   Z_TESTr   r   r   r   r   r      s   r   )
__future__r   r   commonr   r   r   r   r   r   <module>   s   