From ab7839b3a8293bfeb93c37d1b58e08ff80073d3f Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Fri, 25 Mar 2016 15:06:00 +0100 Subject: [PATCH] [rename_series] Better regexp detection of episode titles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On ne récupère par les "chaînes en tre guillemet" au milieu d'un plot d'épisode --- rename_series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rename_series.py b/rename_series.py index a6b89f8..4bc4c81 100755 --- a/rename_series.py +++ b/rename_series.py @@ -21,7 +21,7 @@ def get_titles(filename, debug=False, oneintwo=False): if oneintwo: # On enlève une ligne sur deux text = re.sub("(.*\n).*\n", r'\1', text) - titles = re.findall('"(.*)"', text) + titles = re.findall('^[0-9\s]+"(.*?)"', text, flags=re.MULTILINE) if debug: print "Titres :" pprint.pprint(titles) -- 2.39.2