[utils] Check ext with trailing slash against the list of known extensions
This commit is contained in:
parent
5035536e3f
commit
9cb9a5df77
2 changed files with 19 additions and 1 deletions
|
@ -242,6 +242,9 @@ class TestUtil(unittest.TestCase):
|
|||
def test_determine_ext(self):
|
||||
self.assertEqual(determine_ext('http://example.com/foo/bar.mp4/?download'), 'mp4')
|
||||
self.assertEqual(determine_ext('http://example.com/foo/bar/?download', None), None)
|
||||
self.assertEqual(determine_ext('http://example.com/foo/bar.nonext/?download', None), None)
|
||||
self.assertEqual(determine_ext('http://example.com/foo/bar/mp4?download', None), None)
|
||||
self.assertEqual(determine_ext('http://example.com/foo/bar.m3u8//?download'), 'm3u8')
|
||||
|
||||
def test_find_xpath_attr(self):
|
||||
testxml = '''<root>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue