I have the code that prints all image_url that i want to download
Next I want to save them in a local folder with folder_name=scrap_images
with desired image_name=uni_name that is also in the output
can you help me out.
response = requests.get('https://www.eduvision.edu.pk/admissions.php?
discipline_type=Social-Sciences&sub_level=7&city=&pageNo=2',headers=header)
soup = BeautifulSoup(response.content, 'html.parser')
data=soup.findAll('div',attrs={'class':'col-lg-12 col-xs-12'})[:-1]
for d in data:
uni_name,comma,city = (d.findAll('a')[1].text).partition(',')
print(uni_name)
admis_img = d.img['src']
if(d.img['src']=="images_post/nust.jpg"):
admis_img= "https://www.eduvision.edu.pk/"+d.img['src']
print(admis_img)
else:
print(admis_img)