[ 기타 활동 ]/파이썬

특정폴더의 PDF 화일 받기

유니시티황 2018. 5. 16. 03:58

import urllib.request
 

url ="https://cdn-learn.adafruit.com/downloads/pdf/gemma_m0_clockwork_goggles.pdf"


urllist = url.split('/')

filename = urllist[len(urllist)-1]


def download_file(url):    

    urllib.request.urlretrieve(url, filename)  


download_file(url)

print("finish")




import urllib.request

 

url ="https://cdn-learn.adafruit.com/downloads/pdf/gemma_m0_clockwork_goggles.pdf"


urllist = url.split('/')

filename = urllist[len(urllist)-1]

 

urllib.request.urlretrieve(url, filename)


print("finish")