From e8c392824fbd418b3edc5e3611704d612ad4c8f8 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 18 Jan 2024 16:02:59 +0530 Subject: [PATCH] Fix regex warnings in pygazelle --- lib/pygazelle/torrent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pygazelle/torrent.py b/lib/pygazelle/torrent.py index 52ba13c7..a30fa7ea 100644 --- a/lib/pygazelle/torrent.py +++ b/lib/pygazelle/torrent.py @@ -65,7 +65,7 @@ class Torrent(object): self.snatched = torrent_json_response['torrent']['snatched'] self.time = torrent_json_response['torrent']['time'] self.description = torrent_json_response['torrent']['description'] - self.file_list = [ re.match("(.+){{{(\d+)}}}", item).groups() + self.file_list = [ re.match(r"(.+){{{(\d+)}}}", item).groups() for item in torrent_json_response['torrent']['fileList'].split("|||") ] # tuple ( filename, filesize ) self.file_path = torrent_json_response['torrent']['filePath'] self.user = self.parent_api.get_user(torrent_json_response['torrent']['userId']) @@ -122,7 +122,7 @@ class Torrent(object): self.free_torrent = group_torrent_json_response['freeTorrent'] self.time = group_torrent_json_response['time'] self.description = group_torrent_json_response['description'] - self.file_list = [ re.match("(.+){{{(\d+)}}}", item).groups() + self.file_list = [ re.match(r"(.+){{{(\d+)}}}", item).groups() for item in group_torrent_json_response['fileList'].split("|||") ] # tuple ( filename, filesize ) self.file_path = group_torrent_json_response['filePath'] self.user = self.parent_api.get_user(group_torrent_json_response['userId'])