fix-media #12

Merged
v4l3n71n merged 19 commits from fix-media into master 2023-05-23 14:47:08 +00:00
Showing only changes of commit ba42d56be1 - Show all commits

View File

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