If you're dealing with lazy loading, try `selenium-wire` instead of plain Selenium. It captures all network requests, so you can grab image URLs even if they're loaded dynamically.
For colab scrape images from website python, it's a bit slower but way more reliable.
```python
from seleniumwire import webdriver
driver = webdriver.Chrome()
driver.get("your_url")
for request in driver.requests:
if request.path.endswith(('.jpg', '.png')):
print(request.url)
```
Bonus: it also handles AJAX-loaded content!
For colab scrape images from website python, it's a bit slower but way more reliable.
```python
from seleniumwire import webdriver
driver = webdriver.Chrome()
driver.get("your_url")
for request in driver.requests:
if request.path.endswith(('.jpg', '.png')):
print(request.url)
```
Bonus: it also handles AJAX-loaded content!
