diff --git a/tools/crawler/spiders/forums/ilforumdegliincel.py b/tools/crawler/spiders/forums/ilforumdegliincel.py index 2ee93210e..400e1ef12 100644 --- a/tools/crawler/spiders/forums/ilforumdegliincel.py +++ b/tools/crawler/spiders/forums/ilforumdegliincel.py @@ -29,8 +29,7 @@ def parse(self, response, **kwargs): # extract thread id match = re.search(r"(\?t=)(\w*)", self.current_thread) - if match: - thread_id = match.group(2) + thread_id = match.group(2) if match else -1 # find the number of pages of this thread pages_element = response.css( diff --git a/tools/crawler/spiders/forums/ilforumdeibrutti.py b/tools/crawler/spiders/forums/ilforumdeibrutti.py index 9b1fc1ff5..a140c3193 100644 --- a/tools/crawler/spiders/forums/ilforumdeibrutti.py +++ b/tools/crawler/spiders/forums/ilforumdeibrutti.py @@ -30,8 +30,7 @@ def parse(self, response, **kwargs): # extract thread id match = re.search(r"(\?t=)(\w*)", self.current_thread) - if match: - thread_id = match.group(2) + thread_id = match.group(2) if match else -1 # find the number of pages of this thread pages_element = response.css( diff --git a/tools/crawler/spiders/forums/unbruttoforum.py b/tools/crawler/spiders/forums/unbruttoforum.py index f2c95f10b..604bc4abf 100644 --- a/tools/crawler/spiders/forums/unbruttoforum.py +++ b/tools/crawler/spiders/forums/unbruttoforum.py @@ -30,8 +30,7 @@ def parse(self, response, **kwargs): # extract thread id match = re.search(r"(\?t=)(\w*)", self.current_thread) - if match: - thread_id = match.group(2) + thread_id = match.group(2) if match else -1 # find the number of pages of this thread pages_element = response.css(