raise_for_status()1 스크래핑 0. 기초 requests, headers , re, BeautifulSoup HTML, XPath, 정규식 BeautifulSoup4 : 네이버 웹툰, 가우스 전자, 쿠팡, 다음 CSV : 네이버 금융 Selenium 네이버 로그인, 네이버 항공권, 구글무비 Headless 크롬, Wrap Up 웹사이트 접속 후, 전체 text 읽어오기 import requests res = requests.get("http://google.com") res.raise_for_status() print("응답코드 :", res.status_code) #200이면 정상 # print(len(res.text)) # print(res.text) with open("mygoogle.html", "w", encoding="utf8") as f: f.write(res.text) # if res.status.. 활용3. 웹스크래핑(0825-0829)/requests 2022. 8. 25. 이전 1 다음