import requests
url = "http://danny610.tistory.com"
# User-Agent 정보 : https://www.whatismybrowser.com/detect/what-is-my-user-agent
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"}
res = requests.get(url, headers=headers)
res.raise_for_status()
with open("mygoogle.html", "w", encoding="utf8") as f:
f.write(res.text)
[파이썬 웹 스크래핑] Beautifulsoup4 (네이버 웹툰) - 3 (0) | 2020.09.01 |
---|---|
[파이썬 웹 스크래핑] Beautifulsoup4 (네이버 웹툰) - 2 (0) | 2020.08.31 |
[파이썬 웹 스크래핑] Beautifulsoup4 (네이버 웹툰) - 1 (0) | 2020.08.29 |
[파이썬 웹 스크래핑] request 모듈 (0) | 2020.08.26 |
[파이썬 웹 스크래핑] 기본 정규식 (0) | 2020.08.26 |
댓글 영역