aboutsummaryrefslogtreecommitdiff
path: root/test/test_InfoExtractor.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2024-04-26 18:57:44 +0100
committerdirkf <fieldhouse@gmx.net>2024-05-30 15:46:36 +0100
commit21924742f79ccbd62d16ef4120518c6a5da8614e (patch)
tree89264cf78caf3a04808b1b03e9364e000c3d8e1c /test/test_InfoExtractor.py
parent768ccccd9b18bc48d129b12d14eace4ebb3655d8 (diff)
downloadyoutube-dl-21924742f79ccbd62d16ef4120518c6a5da8614e.tar.xz
[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
Diffstat (limited to 'test/test_InfoExtractor.py')
-rw-r--r--test/test_InfoExtractor.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py
index d55d6ad54..09100a1d6 100644
--- a/test/test_InfoExtractor.py
+++ b/test/test_InfoExtractor.py
@@ -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 = '''