From ba42d56be1c6248d19a6b4fb118512fc2d044303 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Tue, 16 May 2023 00:15:16 +0200 Subject: [PATCH] fix webpage --- lib/WPExport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WPExport.py b/lib/WPExport.py index d6b2ee9..58827da 100644 --- a/lib/WPExport.py +++ b/lib/WPExport.py @@ -108,12 +108,14 @@ class WPExport: pagingfirstline = class_div[0].find_all("a") if len(pagingfirstline) > 1: lastpage = pagingfirstline[len(pagingfirstline)-1].get("href", "/") + self._logger.debug("{0} : Last page {1}".format(self._name, lastpage)) + element_lastpage = lastpage.split("/")[len(lastpage.split("/"))-1] number_page = element_lastpage.split("-")[0].split("p")[1] number_lastpage = int(number_page) / 10 setPageDivided = int(number_lastpage) / max_thread - setPagePart = setPageDivided * (index_thread + 1) + setPagePart = setPageDivided * (index_thread + 1) + 1 firstPagePart = (setPagePart - setPageDivided) self._logger.debug("{0} : Total page : {1}".format(self._name,int(number_lastpage)))