[googlesearch] Fix next page indicator check
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 13 Mar 2014 15:52:13 +0000 (16:52 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 13 Mar 2014 15:52:13 +0000 (16:52 +0100)
test/test_playlists.py
youtube_dl/extractor/googlesearch.py

index e74d42264cf2b6287fff336c86690a009d9a7209..fbeed1c8cde5c02f100ca50cbe42e20203fe0155 100644 (file)
@@ -249,7 +249,7 @@ class TestPlaylists(unittest.TestCase):
         self.assertIsPlaylist(result)
         self.assertEqual(result['id'], 'python language')
         self.assertEqual(result['title'], 'python language')
-        self.assertTrue(len(result['entries']) == 15)
+        self.assertEqual(len(result['entries']), 15)
 
     def test_generic_rss_feed(self):
         dl = FakeYDL()
index 5c25642702993f1ec344ce9a0d4967fffedc760a..383032d81b1c9bd965be9caee8adefd79547b208 100644 (file)
@@ -46,6 +46,6 @@ class GoogleSearchIE(SearchInfoExtractor):
                     'url': mobj.group(1)
                 })
 
-            if (len(entries) >= n) or not re.search(r'class="pn" id="pnnext"', webpage):
+            if (len(entries) >= n) or not re.search(r'id="pnnext"', webpage):
                 res['entries'] = entries[:n]
                 return res