4 from .common
import SearchInfoExtractor
7 class GoogleSearchIE(SearchInfoExtractor
):
8 IE_DESC
= 'Google Video search'
9 IE_NAME
= 'video.google:search'
10 _SEARCH_KEY
= 'gvsearch'
12 'url': 'gvsearch15:python language',
14 'id': 'python language',
15 'title': 'python language',
21 def _search_results(self
, query
):
22 for pagenum
in itertools
.count():
23 webpage
= self
._download
_webpage
(
24 'http://www.google.com/search', f
'gvsearch:{query}',
25 note
=f
'Downloading result page {pagenum + 1}',
29 'start': pagenum
* self
._PAGE
_SIZE
,
30 'num': self
._PAGE
_SIZE
,
34 for url
in re
.findall(r
'<div[^>]* class="dXiKIc"[^>]*><a href="([^"]+)"', webpage
):
35 yield self
.url_result(url
)
37 if not re
.search(r
'id="pnnext"', webpage
):