For relative URLs, you can also use `urljoin` from `urllib.parse`:
```python
from urllib.parse import urljoin
img_url = urljoin(url, img['src'])
```
This handles all the messy path stuff for you.
And yeah, bs4 is fine, but if you're doing heavy scraping, check out Scrapy. It’s built for this stuff.
```python
from urllib.parse import urljoin
img_url = urljoin(url, img['src'])
```
This handles all the messy path stuff for you.
And yeah, bs4 is fine, but if you're doing heavy scraping, check out Scrapy. It’s built for this stuff.
