diff options
| author | 2021-01-11 03:25:49 -0500 | |
|---|---|---|
| committer | 2021-01-11 03:25:49 -0500 | |
| commit | 99541ac9da24070cd241149ee54db4bf81d564b7 (patch) | |
| tree | 073fefa95f7ddedf777db89bb237b51860c1f32f /gallery_dl/util.py | |
| parent | bc18b55e1dd21a4528241926df6302182404fb5a (diff) | |
| parent | 6335711bbe769b6b9301a88d88790d7a2f8aa82e (diff) | |
Update upstream source from tag 'upstream/1.16.3'
Update to upstream version '1.16.3'
with Debian dir 9f836edb40c3d6f8084f75a5c1e53b6a52613e4f
Diffstat (limited to 'gallery_dl/util.py')
| -rw-r--r-- | gallery_dl/util.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gallery_dl/util.py b/gallery_dl/util.py index d91d29a..ffd686e 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -506,6 +506,7 @@ class Formatter(): - "c": calls str.capitalize - "C": calls string.capwords - "t": calls str.strip + - "d": calls text.parse_timestamp - "U": calls urllib.parse.unquote - "S": calls util.to_string() - Example: {f!l} -> "example"; {f!u} -> "EXAMPLE" @@ -537,6 +538,7 @@ class Formatter(): "c": str.capitalize, "C": string.capwords, "t": str.strip, + "d": text.parse_timestamp, "U": urllib.parse.unquote, "S": to_string, "s": str, @@ -767,13 +769,14 @@ class PathFormat(): restrict = extractor.config("path-restrict", "auto") replace = extractor.config("path-replace", "_") - if restrict == "auto": restrict = "\\\\|/<>:\"?*" if WINDOWS else "/" elif restrict == "unix": restrict = "/" elif restrict == "windows": restrict = "\\\\|/<>:\"?*" + elif restrict == "ascii": + restrict = "^0-9A-Za-z_." self.clean_segment = self._build_cleanfunc(restrict, replace) remove = extractor.config("path-remove", "\x00-\x1f\x7f") |
