파이썬 network 썸네일형 리스트형 Python url download (파이썬 다운로드) 파이썬에서 url을 입력해서 download 받는 방법이다. www.python.org에서 html을 다운로드 해보자 import urllib # Get a file-like object for the Python Web site's home page. f = urllib.urlopen("http://www.python.org") # Read from the object, storing the page's contents in 's'. s = f.read() f.close() urllib를 import하고 urllib.urlopen() 함수를 호출하여 읽어들일 url을 나타내는 네트워크 객체를 생성하고 s라는 변수에 읽어 들인다. 그러면 끝 ! print s 라고 치면 읽어들인 것을 프린트 한다. url.. 더보기 이전 1 다음