ML & DL/데이터 분석

[python] 웹페이지 크롤링 기초

uni2237 2021. 9. 28.
728x90
728x90

urllib : Python에서는 쉽게 웹페이지의 정보를 가져올 수 있는 패키지

urllib.request.urlopen 함수 :  해당 url의 html 파일을 가져옴

from urllib.request import urlopen

webpage=urlopen('https://www.naver.com/').read().decode('utf-8')

print(webpage)

 

 

- 실행결과 (일부)

728x90

'ML & DL > 데이터 분석' 카테고리의 다른 글

[pandas] Dataframe 행 위,아래로 옮기기 : shift()  (0) 2022.06.02
[python] Pandas 기초  (0) 2021.10.03
[python] Numpy 기초  (0) 2021.09.28

댓글