diff --git a/lib/WPImport.py b/lib/WPImport.py index 14d8c81..b3e5d80 100644 --- a/lib/WPImport.py +++ b/lib/WPImport.py @@ -223,7 +223,9 @@ class WPimport: author = self._getAuthor(self._author) else: link_a = albumbody.find_all("a") - href_a = link_a[0].get("href", "/") + for i in link_a: + if re.search(r"/albums/", i.get("href", "/")): + href_a = i.get("href", "/") author = self._getInfoAlbum(href_a) self._logger.info("{0} : author : {1}".format(self._name, author)) self._getAuthor(author)