Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unable to access the page contents until it fully loads #3185

Answered by mdmintz
Byperion asked this question in Q&A
Discussion options

After successfully bypassing Cloudflare, the page takes a total of 90-120 seconds to load. The contents I need shows up within the first 20 seconds. I have a large number of pages to process, in the neighborhood of 450k pages. Is there a way to access the contents before the page fully loads?

You must be logged in to vote

There are ways of accessing the page sooner:

--pls="none" / pls="none" --> Set pageLoadStrategy to "none": This strategy causes Selenium to return immediately after the initial HTML content is fully received by the browser.

--sjw / sjw=True --> Skip JS Waits, such as wait_for_ready_state_complete().

With those combined, you'll have access to the page quickly, but you may need to add waits on top of that if things are too fast.

Replies: 2 comments 2 replies

Comment options

There are ways of accessing the page sooner:

--pls="none" / pls="none" --> Set pageLoadStrategy to "none": This strategy causes Selenium to return immediately after the initial HTML content is fully received by the browser.

--sjw / sjw=True --> Skip JS Waits, such as wait_for_ready_state_complete().

With those combined, you'll have access to the page quickly, but you may need to add waits on top of that if things are too fast.

You must be logged in to vote
1 reply
Comment options

Thanks!

Answer selected by mdmintz
Comment options

SJW not work!
I try like this:

import seleniumbase as SB
driver = SB.Driver(browser='Chrome', headless=False, uc=True, locale_code="en", block_images=False, pls="none", sjw=True)

And get error:
Driver() got an unexpected keyword argument 'sjw'

You must be logged in to vote
1 reply
Comment options

Skipping JS waits ("sjw") is for the SB() format only. Not the Driver() format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /