How to Web Scrape Images from HTML Using BeautifulSoup (bs4) – Any Tips or Best Practices?

20 Replies, 2293 Views

Wow, thanks so much, everyone! This is super helpful. I tried the `urljoin` trick, and it worked like a charm for the relative URLs. I also gave `Selenium` a shot for the lazy-loaded images, and it’s doing the job, though it’s a bit slower than I’d like.

Quick follow-up: Does anyone know if there’s a way to speed up `Selenium` for lazy-loaded images? Or is `Playwright` really that much faster? Also, has anyone used `requests-html` for this? I’m curious if it’s worth switching to.

Thanks again, y’all! 🙌

Messages In This Thread



Users browsing this thread: 1 Guest(s)