mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-05 20:41:47 -07:00
[InfoExtractor] Misc yt-dlp back-ports, etc
* add _yes_playlist() method * avoid crash using _NETRC_MACHINE * use _search_json() in _search_nextjs_data() * _search_nextjs_data() default is JSON, not text * test for above
This commit is contained in:
parent
768ccccd9b
commit
21924742f7
2 changed files with 50 additions and 16 deletions
|
@ -153,6 +153,9 @@ class TestInfoExtractor(unittest.TestCase):
|
|||
'''
|
||||
search = self.ie._search_nextjs_data(html, 'testID')
|
||||
self.assertEqual(search['props']['pageProps']['video']['id'], 'testid')
|
||||
search = self.ie._search_nextjs_data(
|
||||
'no next.js data here, move along', 'testID', default={'status': 0})
|
||||
self.assertEqual(search['status'], 0)
|
||||
|
||||
def test_search_nuxt_data(self):
|
||||
html = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue