Yen Chi Hsuan
8 years ago
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30
2 changed files with
5 additions and
5 deletions
-
test/test_utils.py
-
youtube_dl/utils.py
|
|
@ -155,8 +155,8 @@ class TestUtil(unittest.TestCase): |
|
|
|
self.assertTrue(sanitize_filename(':', restricted=True) != '') |
|
|
|
|
|
|
|
self.assertEqual(sanitize_filename( |
|
|
|
'ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ', restricted=True), |
|
|
|
'AAAAAAAECEEEEIIIIDNOOOOOOUUUUYPssaaaaaaaeceeeeiiiionoooooouuuuypy') |
|
|
|
'ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØŒÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøœùúûüýþÿ', restricted=True), |
|
|
|
'AAAAAAAECEEEEIIIIDNOOOOOOOEUUUUYPssaaaaaaaeceeeeiiiionoooooooeuuuuypy') |
|
|
|
|
|
|
|
def test_sanitize_ids(self): |
|
|
|
self.assertEqual(sanitize_filename('_n_cd26wFpw', is_id=True), '_n_cd26wFpw') |
|
|
|
|
|
@ -104,9 +104,9 @@ KNOWN_EXTENSIONS = ( |
|
|
|
'f4f', 'f4m', 'm3u8', 'smil') |
|
|
|
|
|
|
|
# needed for sanitizing filenames in restricted mode |
|
|
|
ACCENT_CHARS = dict(zip('ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ', |
|
|
|
itertools.chain('AAAAAA', ['AE'], 'CEEEEIIIIDNOOOOOOUUUUYP', ['ss'], |
|
|
|
'aaaaaa', ['ae'], 'ceeeeiiiionoooooouuuuypy'))) |
|
|
|
ACCENT_CHARS = dict(zip('ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØŒÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøœùúûüýþÿ', |
|
|
|
itertools.chain('AAAAAA', ['AE'], 'CEEEEIIIIDNOOOOOO', ['OE'], 'UUUUYP', ['ss'], |
|
|
|
'aaaaaa', ['ae'], 'ceeeeiiiionoooooo', ['oe'], 'uuuuypy'))) |
|
|
|
|
|
|
|
|
|
|
|
def preferredencoding(): |
|
|
|