diff --git a/gallery_dl/util.py b/gallery_dl/util.py index e2cca556..03b38353 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -210,9 +210,11 @@ def to_string(value): return ", ".join(map(str, value)) return str(value) + def remove_invisible_chars_strip(text): """Remove all invisible characters from 'text' then strip""" - return "".join(c for c in text if unicodedata.category(c)[0] != "C").strip() + return "".join(c for c in text if unicodedata.category(c)[0] != "C")\ + .strip() def datetime_to_timestamp(dt):