728x90

파이썬 - urllib request 이용한 이미지 다운로드

from urllib import request

img_URL = "https://t1.daumcdn.net/daumtop_chanel/op/20200723055344399.png"

file_ext = img_URL.split('.')[-1] # 확장자 추출

request.urlretrieve(img_URL, "test" + "."+ file_ext)

+ Recent posts