From 47f504beb559c8a51f4569470ae9d6303fca902e Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 1 Jul 2023 00:11:43 +0200 Subject: [PATCH] list tag --- lib/WPMenu.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/WPMenu.py b/lib/WPMenu.py index d2bb997..287702b 100644 --- a/lib/WPMenu.py +++ b/lib/WPMenu.py @@ -46,6 +46,11 @@ class WPMenu: page = self._request.get(i) if page.status_code == 200: soup = BeautifulSoup(page.text, self._parser) + ul = soup.find_all("ul", id="listsmooth") + for anchor in ul[0].find_all("li"): + li = anchor.find_all("li") + for content in li: + a = content.find("a") else: self._logger.error("{0} : index didn't get due status code : {1}".format(self._name, page.status_code)) self._logger.debug("{0} : {1}".format(self._name, page.content))