From f8c1f1d14cb21879ded6fdfba2e919b652692410 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Wed, 20 Mar 2024 04:43:10 -0700 Subject: [PATCH] fix syntax warnings on 3.12 (#1263) --- mps_youtube/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mps_youtube/util.py b/mps_youtube/util.py index 1968f87e..c51bdcdc 100644 --- a/mps_youtube/util.py +++ b/mps_youtube/util.py @@ -492,7 +492,7 @@ def _get_mpv_version(exename): def _get_mplayer_version(exename): o = subprocess.check_output([exename]).decode() - m = re.search('MPlayer SVN[\s-]r([0-9]+)', o, re.MULTILINE|re.IGNORECASE) + m = re.search(r'MPlayer SVN[\s-]r([0-9]+)', o, re.MULTILINE|re.IGNORECASE) ver = 0 if m: @@ -510,7 +510,7 @@ def _get_mplayer_version(exename): def _get_metadata(song_title): ''' Get metadata from a song title ''' - t = re.sub("[\(\[].*?[\)\]]", "", song_title.lower()) + t = re.sub(r"[\(\[].*?[\)\]]", "", song_title.lower()) t = t.split('-') if len(t) != 2: # If len is not 2, no way of properly knowing title for sure