Skip to content

Commit

Permalink
facebook: fix xpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Nov 5, 2023
1 parent 2d8e81a commit 4f94efe
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions automon/integrations/facebook/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 4f94efe

Please sign in to comment.