diff --git a/lib/WPImport.py b/lib/WPImport.py
index c27c22d..2740011 100644
--- a/lib/WPImport.py
+++ b/lib/WPImport.py
@@ -141,7 +141,7 @@ class WPimport:
def _getInfoAlbum(self, link):
if self._ssl_canalblog:
- link = link.replace("http", "https")
+ link = link.replace("http", "https").("httpss", "https")
self._logger.info("{0} : Info album : {1}".format(self._name, link))
link_o = urlparse(link)
if len(link_o.netloc) > 0:
@@ -162,14 +162,16 @@ class WPimport:
if os.path.exists("{0}/..{1}".format(self._directory, link_o)):
page_img = open("{0}/..{1}".format(self._directory, link_o), "r")
soup = BeautifulSoup(page_img, self._parser)
- paragraph = soup.find("div", class_="albumbody").find("p")
- self._logger.info("{0} get paragraph : {1}".format(self._name, paragraph))
- split_paragraph = str(paragraph).split("
")
- self._logger.info("{0} length paragraph splitted : {1}".format(self._name, len(split_paragraph)))
- if len(split_paragraph) == 1:
- split_paragraph = str(paragraph).split("
")
- self._logger.info("{0} get paragraph splitted : {1}".format(self._name, split_paragraph))
- author = split_paragraph[1].split(":")[1].replace(" ", "").lower()
+ paragraphs = soup.find("div", class_="albumbody").find_all("p")
+ for paragraph in paragraphs:
+ self._logger.info("{0} get paragraph : {1}".format(self._name, paragraph))
+ split_paragraph = str(paragraph).split("
")
+ self._logger.info("{0} length paragraph splitted : {1}".format(self._name, len(split_paragraph)))
+ if len(split_paragraph) == 1:
+ split_paragraph = str(paragraph).split("
")
+ self._logger.info("{0} get paragraph splitted : {1}".format(self._name, split_paragraph))
+ if len(split_paragraph) > 0:
+ author = split_paragraph[1].split(":")[1].replace(" ", "").lower()
return author