Skip to content

Commit

Permalink
facebook: fix typo not_available_right_now
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Nov 9, 2024
1 parent 6865b1a commit 99860c7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions automon/integrations/facebook/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, url: str = None):
self._visible = None
self._blocked_by_login = None
self._browser_not_supported = None
self._not_available_right_not = None
self._not_available_right_now = None

def blocked_by_login(self):
try:
Expand Down Expand Up @@ -248,20 +248,20 @@ def must_login(self):
message, session, stacktrace = self.error_parsing(error)
logger.error(f'{self.url} :: {message=} :: {session=} :: {stacktrace=}')

def not_available_right_not(self):
def not_available_right_now(self):
try:
self._not_available_right_not = self._browser.wait_for_anything(
self._not_available_right_now = self._browser.wait_for_anything(
match="This content isn't available right now",
value='span',
value_attr='text',
by=self._browser.by.TAG_NAME,
exact_match=True
)
if self._not_available_right_not:
self._not_available_right_not = self._not_available_right_not[0]
self._not_available_right_not = self._not_available_right_not.text
logger.debug(self._not_available_right_not)
return self._not_available_right_not
if self._not_available_right_now:
self._not_available_right_now = self._not_available_right_now[0]
self._not_available_right_now = self._not_available_right_now.text
logger.debug(self._not_available_right_now)
return self._not_available_right_now
except Exception as error:
message, session, stacktrace = self.error_parsing(error)
logger.error(f'{self.url} :: {message=} :: {session=} :: {stacktrace=}')
Expand Down Expand Up @@ -566,7 +566,7 @@ def reset_cache(self):
self._visible = None
self._blocked_by_login = None
self._browser_not_supported = None
self._not_available_right_not = None
self._not_available_right_now = None

def reset_rate_counter(self):
self.RATE_COUNTER = []
Expand Down Expand Up @@ -659,7 +659,7 @@ def to_dict(self):
visible=self._visible or self.visible(),
blocked_by_login=self._blocked_by_login or self.blocked_by_login(),
browser_not_supported=self._browser_not_supported or self.browser_not_supported(),
not_available_right_not=self._not_available_right_not or self.not_available_right_not(),
not_available_right_now=self._not_available_right_now or self.not_available_right_now(),
)

def to_empty(self):
Expand All @@ -681,7 +681,7 @@ def to_empty(self):
visible=None,
blocked_by_login=None,
browser_not_supported=None,
not_available_right_not=None,
not_available_right_now=self._not_available_right_now or self.not_available_right_now(),
)

def quit(self):
Expand Down

0 comments on commit 99860c7

Please sign in to comment.