0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-14 01:05:06 +00:00

[googlesearch] Fix next page indicator check

This commit is contained in:
Philipp Hagemeister 2014-03-13 16:52:13 +01:00
parent 84769e708c
commit c3d36f134f
2 changed files with 2 additions and 2 deletions

View file

@ -249,7 +249,7 @@ def test_GoogleSearch(self):
self.assertIsPlaylist(result) self.assertIsPlaylist(result)
self.assertEqual(result['id'], 'python language') self.assertEqual(result['id'], 'python language')
self.assertEqual(result['title'], '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): def test_generic_rss_feed(self):
dl = FakeYDL() dl = FakeYDL()

View file

@ -46,6 +46,6 @@ def _get_n_results(self, query, n):
'url': mobj.group(1) '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] res['entries'] = entries[:n]
return res return res