from bs4 import BeautifulSoup
import requests
import urllib.request
import urllib.parse
url = "크롤링할 사이트 주소"
headers = {'User-Agent':'아래 링크에서 얻은 user agent 복붙'}
# http://www.useragentstring.com/
r = requests.get(url, headers = headers)
soup = BeautifulSoup(r.text, 'html.parser')
'파이썬' 카테고리의 다른 글
Overwrite previous output (python, print) (0) | 2021.09.06 |
---|---|
beautiful soup copy selector (0) | 2021.09.03 |
pandas / 열 데이터 누적 (0) | 2021.06.18 |
기존 데이터의 조건으로 열 생성하기 (0) | 2021.06.18 |
기존 데이터로 열 생성하기 (0) | 2021.06.18 |