Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using Beautifulsoup I'm writing a script which will download all the images, but my current implementation isn't returning anything.

Link: https://www.f1-fansite.com/f1-wallpaper/wallpaper-photos-monaco-f1-gp/


When I run the code it returns an empty list. I've been at it for an hour and I'm not too sure where I'm going wrong?


What I have tried:

import requests
from bs4 import BeautifulSoup


r = requests.get('https://www.f1-fansite.com/f1-wallpaper/wallpaper-photos-monaco-f1-gp/')
soup = BeautifulSoup(r.content, 'lxml')


pictureslist = soup.find_all('div', attrs={'id':'gallery-1','class':'gallery galleryid-268780 gallery-columns-3 gallery-size-medium'})

print(pictureslist)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900