U
    g                     @   s0   d dl Z d dlZddlmZ G dd deZdS )    N   )SearchInfoExtractorc                   @   s8   e Zd ZdZdZdZddddddgZd	Zd
d ZdS )GoogleSearchIEzGoogle Video searchzvideo.google:searchZgvsearchzgvsearch15:python languagezpython language)idtitle   )urlZ	info_dictZplaylist_countd   c                 c   sx   t  D ]j}| jdd| d|d  d||| j | jddd}td	|D ]}| |V  qNtd
|s d S qd S )Nzhttp://www.google.com/searchz	gvsearch:zDownloading result page r   Zviden)ZtbmqstartnumZhl)Znotequeryz/<div[^>]* class="dXiKIc"[^>]*><a href="([^"]+)"zid="pnnext")	itertoolscountZ_download_webpage
_PAGE_SIZErefindallZ
url_resultsearch)selfr   ZpagenumZwebpager    r   A/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/googlesearch.py_search_results   s      zGoogleSearchIE._search_resultsN)	__name__
__module____qualname__ZIE_DESCZIE_NAMEZ_SEARCH_KEYZ_TESTSr   r   r   r   r   r   r      s   r   )r   r   commonr   r   r   r   r   r   <module>   s   