Category : image

I have a directory called ‘Photos-test’, with multiple subdirectories. Each subdirectory contains two subdirectories, "Camera Photos" and "Edited Photos." "Camera Photos" contains .jpg images. I need to iteratively run through each subdirectory and resize the images within each "Camera Photos" subdirectory and then save these resized images into each "Edited Photos" subdirectory. The code I ..

Read more

I try this and it isn’t work from bs4.element import ProcessingInstruction import requests import os from bs4 import BeautifulSoup def imagedownload (url , folder): try: os.mkdir(os.path.join(os.getcwd),folder) except: pass os.chdir (os.path.join(os.getcwd),folder) re = requests.get(url) soup = BeautifulSoup(re . text , ‘htmlparser’) images = soup.find_all (‘img’) for image in images : name = image[‘alt’] link = image[‘src’] ..

Read more