mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 08:26:50 +00:00
[googlesearch] Fix next page indicator check
This commit is contained in:
parent
84769e708c
commit
c3d36f134f
@ -249,7 +249,7 @@ class TestPlaylists(unittest.TestCase):
|
|||||||
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()
|
||||||
|
@ -46,6 +46,6 @@ class GoogleSearchIE(SearchInfoExtractor):
|
|||||||
'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
|
||||||
|
Loading…
Reference in New Issue
Block a user