Skip to content

Commit 5131223

Browse files
committed
try-login: allow time for any redirect or scripts
Multiple redirects may occur after the login process, especially on JS-heavy pages.
1 parent 9261d11 commit 5131223

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

brozzler/browser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,9 @@ def browse_page(
620620
"login navigated away; returning!", page_url=page_url
621621
)
622622
self.navigate_to_page(page_url, timeout=page_timeout)
623+
# allow time for any additional redirects or scripts to run after login
624+
time.sleep(10)
625+
self._wait_for_idle(idle_time=5, timeout=4)
623626
# If the target page HTTP status is 4xx/5xx, there is no point
624627
# in running behaviors, screenshot, outlink and hashtag
625628
# extraction as we didn't get a valid page.

0 commit comments

Comments
 (0)