about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-05-12 18:44:56 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-05-12 18:44:56 +0200
commit3c5e7729e1ec3663f6cf2894b6e0474d76f2b206 (patch)
tree0b20b7759cefffc77b260c49e90295065f712c99
parent5a853e14231d1e69aa027fcb746ef3aa6ddeb864 (diff)
downloadyoutube-dl-3c5e7729e1ec3663f6cf2894b6e0474d76f2b206.tar.gz
youtube-dl-3c5e7729e1ec3663f6cf2894b6e0474d76f2b206.tar.xz
youtube-dl-3c5e7729e1ec3663f6cf2894b6e0474d76f2b206.zip
GoogleSearchIE: change query urls to http://www.google.com/search
The old one was given HTTP 404 errors
-rwxr-xr-xyoutube_dl/InfoExtractors.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 5c7af5229..e4b6c01ab 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1407,7 +1407,7 @@ class YoutubeSearchIE(InfoExtractor):
 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 @@ class GoogleSearchIE(InfoExtractor):
         }
 
         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))