1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-01 03:22:52 -05:00

[extractor/common] Support multiple properties in _og_search_property

This commit is contained in:
Sergey M․
2016-08-02 22:55:14 +07:00
parent ce28252c48
commit b070564efb
2 changed files with 10 additions and 2 deletions

View File

@ -48,6 +48,9 @@ class TestInfoExtractor(unittest.TestCase):
self.assertEqual(ie._og_search_property('foobar', html), 'Foo')
self.assertEqual(ie._og_search_property('test1', html), 'foo > < bar')
self.assertEqual(ie._og_search_property('test2', html), 'foo >//< bar')
self.assertEqual(ie._og_search_property(('test0', 'test1'), html), 'foo > < bar')
self.assertRaises(RegexNotFoundError, ie._og_search_property, 'test0', html, None, fatal=True)
self.assertRaises(RegexNotFoundError, ie._og_search_property, ('test0', 'test00'), html, None, fatal=True)
def test_html_search_meta(self):
ie = self.ie