From b69c9146b217f55e8cc627a739c644a99ec8cb87 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 19 Sep 2019 13:51:27 +0100 Subject: [PATCH] should be using pair_start/pair_end throughout `for` --- src/utils/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/http.py b/src/utils/http.py index 4896866e..eed1c0fb 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -21,8 +21,8 @@ def url_sanitise(url: str): # google.com/()) -> google.com/() if url.endswith(pair_end): if pair_start in url: - open_index = url.rfind("(") - other_index = url.rfind(")", 0, len(url)-1) + open_index = url.rfind(pair_start) + other_index = url.rfind(pair_end, 0, len(url)-1) if not other_index == -1 and other_index < open_index: url = url[:-1] else: