What's the best way to scrape cards data using Python? or How can I efficiently scrape cards data wit

20 Replies, 2176 Views

For scrape cards python, don’t sleep on `requests-html`. It’s like BeautifulSoup but with JS support.

```python
from requests_html import HTMLSession

session = HTMLSession()
r = session.get('your_url')
r.html.render(sleep=2) # renders JS
cards = r.html.find('.card')
```

Downside: slower for big jobs. Upside: no need for a full browser.

Messages In This Thread



Users browsing this thread: 1 Guest(s)