[b]"What's the best way to scrape cards data using Python?"[/b] or [b]"How can I efficiently scrape cards data wit

20 Replies, 1740 Views

For lazy-loading in scrape cards python, try auto-scrolling with Selenium:

```python
from selenium import webdriver
import time

driver = webdriver.Chrome()
driver.get("your_url")

last_height = driver.execute_script("return document.body.scrollHeight")
while True:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")
time.sleep(2)
new_height = driver.execute_script("return document.body.scrollHeight")
if new_height == last_height:
break
last_height = new_height
```

Cards should load as you scroll. Slow but reliable.



Users browsing this thread: 1 Guest(s)