Proxy Community
What's the best way to scrape cards data using Python? or How can I efficiently scrape cards data wit - Printable Version

+- Proxy Community (https://proxycommunity.com/forum)
+-- Forum: Use Case (https://proxycommunity.com/forum/forum-use-case)
+--- Forum: Web Scraping (https://proxycommunity.com/forum/forum-web-scraping)
+--- Thread: What's the best way to scrape cards data using Python? or How can I efficiently scrape cards data wit (/thread-what-s-the-best-way-to-scrape-cards-data-using-python-or-how-can-i-efficiently-scrape-cards-data-wit)

Pages: 1 2 3


“” - darkRun77 - 31-03-2025

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.