fix author

This commit is contained in:
Valentin CZERYBA 2023-09-02 00:26:50 +02:00
parent 7b154e3a1d
commit 963f83ae81

View File

@ -237,7 +237,9 @@ class WPimport:
break
author = self._getInfoAlbum(href_a)
self._logger.info("{0} : author : {1}".format(self._name, author))
self._getAuthor(author)
author = self._getAuthor(author)
data = {"title":albumtitle, "content":content_html, "status":"publish"}
if author != 0:
data = {"title":albumtitle, "content":content_html, "status":"publish", "author":author}
self._logger.debug("{0} : data for album page : {1}".format(self._name, data))
@ -850,6 +852,8 @@ class WPimport:
title = articletitle[0].text
author = articleacreator[0].text.lower()
if len(self._author) > 0:
author = self._author
body = articlebody[0].find_all("p")
bodyhtml = "<p>"
for i in body: