mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-29 09:38:41 -04:00
undo post-login nav (ARI-5385 and/or ARI-5386)
This commit is contained in:
parent
f2227e6759
commit
830b0eef89
1 changed files with 6 additions and 0 deletions
|
@ -434,6 +434,12 @@ class Browser:
|
|||
user_agent=user_agent, timeout=300)
|
||||
if password:
|
||||
self.try_login(username, password, timeout=300)
|
||||
# if login redirected us, return to page_url
|
||||
if page_url != self.url().split('#')[0]:
|
||||
self.logger.info('login navigated to %s, away from %s; returning!', self.url(), page_url)
|
||||
self.navigate_to_page(
|
||||
page_url, extra_headers=extra_headers,
|
||||
user_agent=user_agent, timeout=300)
|
||||
if on_screenshot:
|
||||
jpeg_bytes = self.screenshot()
|
||||
on_screenshot(jpeg_bytes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue