From 4f94efeb0fda7f190a0578abfa337ce6407c1e49 Mon Sep 17 00:00:00 2001 From: naisanzaa Date: Sun, 5 Nov 2023 13:38:52 -0800 Subject: [PATCH] facebook: fix xpaths --- automon/integrations/facebook/groups.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/automon/integrations/facebook/groups.py b/automon/integrations/facebook/groups.py index 7a494824..087f8ee5 100644 --- a/automon/integrations/facebook/groups.py +++ b/automon/integrations/facebook/groups.py @@ -78,7 +78,7 @@ def content_unavailable(self): if not self._content_unavailable: try: - xpath_content_unavailble = self._browser.wait_for_xpath(self.xpath_content_unavailble) + xpath_content_unavailble = self._browser.wait_for_xpath(self._xpath_content_unavailble) self._content_unavailable = self._browser.find_xpath(xpath_content_unavailble).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -98,7 +98,7 @@ def creation_date(self): if not self._creation_date: try: - xpath_creation_date = self._browser.wait_for_xpath(self.xpath_creation_date) + xpath_creation_date = self._browser.wait_for_xpath(self._xpath_creation_date) self._creation_date = self._browser.find_xpath(xpath_creation_date).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -124,7 +124,7 @@ def history(self): if not self._history: try: - xpath_history = self._browser.wait_for_xpath(self.xpath_history) + xpath_history = self._browser.wait_for_xpath(self._xpath_history) self._history = self._browser.find_xpath(xpath_history).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -144,7 +144,7 @@ def members(self): if not self._members: try: - xpath_members = self._browser.wait_for_xpath(self.xpath_members) + xpath_members = self._browser.wait_for_xpath(self._xpath_members) self._members = self._browser.find_xpath(xpath_members).text # TODO: need to clean up string from members and remove bad chars except Exception as error: @@ -178,7 +178,7 @@ def posts_monthly(self): if not self._posts_monthly: try: - xpath_monthly_posts = self._browser.wait_for_xpath(self.xpath_posts_monthly) + xpath_monthly_posts = self._browser.wait_for_xpath(self._xpath_posts_monthly) self._posts_monthly = self._browser.find_xpath(xpath_monthly_posts).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -211,7 +211,7 @@ def posts_today(self): if not self._posts_today: try: - xpath_posts_today = self._browser.wait_for_xpath(self.xpath_posts_today) + xpath_posts_today = self._browser.wait_for_xpath(self._xpath_posts_today) self._posts_today = self._browser.find_xpath(xpath_posts_today).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -244,7 +244,7 @@ def privacy(self): if not self._privacy: try: - xpath_privacy = self._browser.wait_for_xpath(self.xpath_privacy) + xpath_privacy = self._browser.wait_for_xpath(self._xpath_privacy) self._privacy = self._browser.find_xpath(xpath_privacy).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -264,7 +264,7 @@ def privacy_details(self): if not self._privacy_details: try: - xpath_privacy_details = self._browser.wait_for_xpath(self.xpath_privacy_details) + xpath_privacy_details = self._browser.wait_for_xpath(self._xpath_privacy_details) self._privacy_details = self._browser.find_xpath(xpath_privacy_details).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -284,7 +284,7 @@ def title(self) -> str: if not self._title: try: - xpath_title = self._browser.wait_for_xpath(self.xpath_title) + xpath_title = self._browser.wait_for_xpath(self._xpath_title) self._title = self._browser.find_xpath(xpath_title).text except Exception as error: message, session, stacktrace = self.error_parsing(error) @@ -308,7 +308,7 @@ def visible(self) -> str: if not self._visible: try: - xpath_visible = self._browser.wait_for_xpath(self.xpath_visible) + xpath_visible = self._browser.wait_for_xpath(self._xpath_visible) self._visible = self._browser.find_xpath(xpath_visible).text except Exception as error: message, session, stacktrace = self.error_parsing(error)