GuessedAtParserWarning가 뜨고 r의 타입이 다르게 나옵니다
704
1 asked
C:\Users\hyoyi\PycharmProjects\crawling\venv\Scripts\python.exe C:/Users/hyoyi/PycharmProjects/crawling/google.py
무엇을 검색할까요? : 파이썬
<class 'bs4.element.ResultSet'>
C:/Users/hyoyi/PycharmProjects/crawling/google.py:13: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 13 of the file C:/Users/hyoyi/PycharmProjects/crawling/google.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.
soup = BeautifulSoup(html)
<class 'bs4.element.ResultSet'>
Process finished with exit code 0
오류랑 r타입이 다르게 나오는 것을 어떻게 해결하나요?
Answer 2
0
답변 감사합니다!
from urllib.parse import quote_plus
from bs4 import BeautifulSoup
from selenium import webdriver
baseUrl = "https://www.google.com/search?q="
plusUrl = input("무엇을 검색할까요? : ")
url = baseUrl + quote_plus(plusUrl)
driver = webdriver.Chrome()
driver.get(url)
html = driver.page_source
soup = BeautifulSoup(html)
r = soup.select(".r")
print(type(r))
import time
0
63
1
크롤링 실행시 멈춤
0
609
2
에러가 너무 납니다.
0
665
1
에러가 아래와 같이 뜨는데 어떤 이유 일가요?
0
515
0
import
0
259
0
소스 다운은 어디서 받나요?
0
282
0
네이버가 현재 강의로는 크롤링 안되게 해놓았네요
1
300
1
FileNotFound Error
0
413
0
import error
0
375
1
.text 사용 시 값이 비어있는 칸은 nonetype이 들어가서 에러가 발생하는데 예외처리를 어떻게 해야하나요 ?
0
184
0
크롤링 할때 sh_blog_title 형식으로 안나오는데요! ㅠ
0
205
0
Pyautogui.moveTo 작동이 안돼요
1
493
0
네이버 검색 크롤링에서 무한 스크롤 문제 해결
0
438
0
키에러가 나는데 어떻게 해야하는지 궁금합니다.
1
505
1
에러가 뜹니다
0
218
0
스크린샷 폴더 위치 어떻게 아나요?
0
342
0
keyError 해결
1
281
1
오류 관련 질문이요
0
745
1
공유하고 싶은 점
2
182
1
크롤링 실행할 때 질문입니다!!
0
265
1
클래스에 궁금한 점이요!!
0
218
1
질문있습니다.
0
235
1
주피터 노트북에서는 안되나요?
0
258
1
하나만 더 질문할게요..
0
233
1

