diff --git a/subtitle-downloader/subtitle_downloader.py b/subtitle-downloader/subtitle_downloader.py index 4422f2b..08be00b 100755 --- a/subtitle-downloader/subtitle_downloader.py +++ b/subtitle-downloader/subtitle_downloader.py @@ -211,7 +211,7 @@ def main(download_all, iso, language, list_languages, verbose, input_path): sys.exit(0) # Put square brackets into character class so they work with glob - glob_path = input_path.replace('[', '[[]').replace(']', '[]]') + glob_path = re.sub("([\[\]])", "[\g<1>]", input_path) # root, _ = os.path.splitext(input_path) # logging.basicConfig(filename=root + '.log', level=logging.INFO)