Honestly, I gave up on BeautifulSoup for dynamic sites. Now I just use `playwright` in Colab. It's like Selenium but faster and less buggy.
For colab scrape images from website python:
```python
!pip install playwright
import playwright.sync_api
with playwright.sync_api.sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("your_url")
imgs = page.query_selector_all('img')
for img in imgs:
print(img.get_attribute('src'))
```
Works every time, even with infinite scroll pages!
For colab scrape images from website python:
```python
!pip install playwright
import playwright.sync_api
with playwright.sync_api.sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("your_url")
imgs = page.query_selector_all('img')
for img in imgs:
print(img.get_attribute('src'))
```
Works every time, even with infinite scroll pages!
