get link with album

This commit is contained in:
Valentin CZERYBA 2023-08-30 23:45:16 +02:00
parent 2279e4b0b6
commit e5109204aa

View File

@ -223,7 +223,9 @@ class WPimport:
author = self._getAuthor(self._author) author = self._getAuthor(self._author)
else: else:
link_a = albumbody.find_all("a") 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) author = self._getInfoAlbum(href_a)
self._logger.info("{0} : author : {1}".format(self._name, author)) self._logger.info("{0} : author : {1}".format(self._name, author))
self._getAuthor(author) self._getAuthor(author)