mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 08:10:36 +01:00
GoogleSearchIE: change query urls to http://www.google.com/search
The old one was given HTTP 404 errors
This commit is contained in:
parent
5a853e1423
commit
3c5e7729e1
@ -1407,7 +1407,7 @@ def _get_n_results(self, query, n):
|
||||
class GoogleSearchIE(InfoExtractor):
|
||||
"""Information Extractor for Google Video search queries."""
|
||||
_VALID_URL = r'gvsearch(?P<prefix>|\d+|all):(?P<query>[\s\S]+)'
|
||||
_MORE_PAGES_INDICATOR = r'class="pn" id="pnnext"'
|
||||
_MORE_PAGES_INDICATOR = r'id="pnnext" class="pn"'
|
||||
_max_google_results = 1000
|
||||
IE_NAME = u'video.google:search'
|
||||
|
||||
@ -1439,7 +1439,8 @@ def _get_n_results(self, query, n):
|
||||
}
|
||||
|
||||
for pagenum in itertools.count(1):
|
||||
result_url = u'http://video.google.com/videosearch?q=%s&start=%s&hl=en' % (compat_urllib_parse.quote_plus(query), pagenum*10)
|
||||
result_url = u'http://www.google.com/search?tbm=vid&q=%s&start=%s&hl=en' % (compat_urllib_parse.quote_plus(query), pagenum*10)
|
||||
print(result_url)
|
||||
webpage = self._download_webpage(result_url, u'gvsearch:' + query,
|
||||
note='Downloading result page ' + str(pagenum))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user