MCPcopy
hub / github.com/InstaPy/InstaPy / wait_for_valid_authorization

Method wait_for_valid_authorization

instapy/browser.py:294–311  ·  view source on GitHub ↗
(self, username, logger)

Source from the content-addressed store, hash-verified

292 break
293
294 def wait_for_valid_authorization(self, username, logger):
295 # save current page
296 current_url = get_current_url(self)
297
298 # stuck on invalid auth
299 auth_method = "activity counts"
300 counter = 0
301 while True and counter < 10:
302 login_state = check_authorization(self, username, auth_method, logger)
303 if login_state is False:
304 logger.warning("not logged in")
305 counter += 1
306 sleep(60)
307 else:
308 break
309
310 # return to original page
311 web_address_navigator(self, current_url)
312
313
314def convert_selenium_browser(driver):

Callers

nothing calls this directly

Calls 4

get_current_urlFunction · 0.85
check_authorizationFunction · 0.85
sleepFunction · 0.85
web_address_navigatorFunction · 0.85

Tested by

no test coverage detected