본문 바로가기
파이썬

파이썬 BeautifulSoup : 'Response'유형의 객체에는 len ()이 없습니다.

by º기록 2020. 11. 4.
반응형

문제 : 스크립트를 실행하려고하면 BeautifulSoup (html, ...) 에서 "TypeError : object of type 'Response'has no len (). 실제 HTML 전달을 시도했습니다. 매개 변수로 사용되지만 여전히 작동하지 않습니다.

import requests

url = 'http://vineoftheday.com/?order_by=rating'
response = requests.get(url)
html = response.content

soup = BeautifulSoup(html, "html.parser")

 

해결 방법

 


 

참조 페이지 https://stackoverflow.com/questions/36709165

 

 

반응형

댓글