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)))