파이썬
TypeError: object of type 'Response' has no len() 에러
<OOO>
2021. 4. 13. 18:11
728x90
url = "http://example.com"
r = requests.get(url)
html = r.text
soup = BeautifulSoup(html,'html.parser')
links = soup.find_all("a")
굵게 칠해진 부분을 확인해보자. soup 변수에 html 을 넣어줄때 r.text 혹은 r.content 를 안넣어줘서 발생한 오류다.