I\'d need to save pictures from this website in a folder:
http://www.photobirdireland.com/garden-birds.html
I\'ve tried by using import os
from l
Try following code to download images.use urlretrieve
to download image src value to location.
from urllib.request import urlretrieve
import requests
from bs4 import BeautifulSoup
import os
url='http://www.photobirdireland.com/garden-birds.html'
data=requests.get(url).text
soup=BeautifulSoup(data,"html.parser")
images=['http://www.photobirdireland.com/'+ image['src'] for image in soup.find_all('img')]
for img in images:
urlretrieve(img,os.path.basename(img))