Horje
how to scroll down to end of page in selenium python Code Example
how to scroll down to end of page in selenium python
SCROLL_PAUSE_TIME = 0.5

# Get scroll height
last_height = driver.execute_script("return document.body.scrollHeight")

while True:
    # Scroll down to bottom
    driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")

    # Wait to load page
    time.sleep(SCROLL_PAUSE_TIME)

    # Calculate new scroll height and compare with last scroll height
    new_height = driver.execute_script("return document.body.scrollHeight")
    if new_height == last_height:
        break
    last_height = new_height




Python

Related
inverse matrix python Code Example inverse matrix python Code Example
cannot import name 'abc' from 'bson.py3compat' Code Example cannot import name 'abc' from 'bson.py3compat' Code Example
ERROR:  character with byte sequence 0xd0 0x9f in encoding "UTF8" has no equivalent in encoding "LATIN1" Code Example ERROR: character with byte sequence 0xd0 0x9f in encoding "UTF8" has no equivalent in encoding "LATIN1" Code Example
python regex for a url Code Example python regex for a url Code Example
df sort values Code Example df sort values Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7