finish menu with album import
This commit is contained in:
@@ -91,9 +91,11 @@ class WPMenu:
|
||||
search = "posts"
|
||||
post_type = "post"
|
||||
if len(articletitle) == 0:
|
||||
articletitle = soup.find("div", class_="albumbody").find("h2").get_text()
|
||||
search = "pages"
|
||||
post_type = "page"
|
||||
articletitle = soup.find_all("div", class_="albumbody")
|
||||
if len(articletitle) > 0:
|
||||
articletitle = articletitle[0].find("h2").get_text()
|
||||
search = "pages"
|
||||
post_type = "page"
|
||||
|
||||
exist = False
|
||||
for index in range(1,10):
|
||||
@@ -171,7 +173,7 @@ class WPMenu:
|
||||
title = title[::-1]
|
||||
self._logger.info("{0} link {1} title {2}".format(self._name, link, title))
|
||||
if link == "index.html":
|
||||
if second_title == "archives" or second_title == "albums":
|
||||
if second_title == "albums":
|
||||
idMenu = self._getIdFromPost(href)
|
||||
else:
|
||||
idMenu = self._getId(title)
|
||||
|
Reference in New Issue
Block a user