From 0309ce29e7e3fd058ef9f64c7c1662f059d7a227 Mon Sep 17 00:00:00 2001 From: commonsourcecs Date: Sat, 7 Dec 2024 16:35:10 -0800 Subject: [PATCH] Update subdl.py - Fix 'invalid escape sequence' --- subdl.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/subdl.py b/subdl.py index f5d3813..013ef1f 100755 --- a/subdl.py +++ b/subdl.py @@ -30,22 +30,22 @@ options = None BLACKLIST = [ - "opensubtitles", - "addic7ed", - "joycasino", - "bitninja\.io", - "Please rate this subtitle at www\.osdb\.link", - "allsubs", - "firebit\.org", - "humanguardians\.com", - "subtitles by", - "recast\.ai", - "by mstoll", - "subs corrected", - "by tronar", - "titlovi", - "^_$", - "^- _$", + r"opensubtitles", + r"addic7ed", + r"joycasino", + r"bitninja\.io", + r"Please rate this subtitle at www\.osdb\.link", + r"allsubs", + r"firebit\.org", + r"humanguardians\.com", + r"subtitles by", + r"recast\.ai", + r"by mstoll", + r"subs corrected", + r"by tronar", + r"titlovi", + r"^_$", + r"^- _$", ] @@ -221,7 +221,7 @@ def SearchSubtitlesByHash(filename, langs_search): def SearchSubtitlesByIMDBId(filename, langs_search, imdb_id): - result = re.search("\d+", imdb_id) + result = re.search(r"\d+", imdb_id) imdb_id = result.group(0) searchlist = [({"sublanguageid": langs_search, "imdbid": imdb_id})] print("Searching for subtitles for IMDB id=%s..." % (imdb_id), file=sys.stderr)