여기서 저 \970.08 만 출력하고 싶은데 html 안에 속성값이 없어 ㅠㅠ
애들아 이거 값만 따올 수 없냐 ???? 크롤링 질문
익명(14.48)
2021-05-28 18:07
추천 0
댓글 20
다른 게시글
-
스타벅스 vs 스터디카페 [2]익명(116.34) | 21.05.28추천 0
-
근데 이준석 왜 빠는거냐?? [2]익명(203.243) | 21.05.28추천 0
-
이준석이 대통령돼는 거 아님?익명(175.198) | 21.05.28추천 0
-
가슴은 작아도 됨 [1]익명(1.235) | 21.05.28추천 0
-
사람은 그냥 두 종류임익명(175.223) | 21.05.28추천 0
-
2차원 포인터 배열이란거 ㅈㄴ 중의적인거 같음익명(223.39) | 21.05.28추천 0
-
골반도 중요해 [1]익명(115.21) | 21.05.28추천 0
-
응애 나 고졸 서버개발자 [2]핫키(hotkey01) | 21.05.28추천 0
-
가슴 큰 여친 vs 귀요미 여친 [3]익명(119.71) | 21.05.28추천 0
-
솔직히 여자처음볼때 가슴부터 보잖아? [6]익명(203.243) | 21.05.28추천 0
가능
어떻게 ?
https://stackoverflow.com/questions/21476535/jsoup-extract-text-out-of-div-tag-to-string
ㄳㄳ 한번 읽어 봄
여기서는 속성 가지고 하는 것 같은데 내가 출력한 값이 html 클래스에 다 있는거라 안되지 않아? 속성이 없어 ㅜ
value.get_text() or value.string
둘 다 오류가 떠서요 ㅠ
무슨 오류?
프린트문 안의 value 만 저렇게 바꿔주라는 말씀 맞나요 ??
위에꺼 하면 이런 오류가 나와요
Traceback (most recent call last): File "C:/Users/dd/Desktop/aaaa.py", line 13, in html = driver.page_source File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 679, in page_source return self.execute(Command.GET_PAGE_SOURCE)['value'] File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error
아래꺼 하면 Traceback (most recent call last): File "C:/Users/dd/Desktop/aaaa.py", line 13, in html = driver.page_source File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 679, in page_source return self.execute(Command.GET_PAGE_SOURCE)['value'] File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute sel
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchWindowException: Message: no such window: target window already closed from unknown error: web view not found (Session info: chrome=91.0.4472.77)
https://hogni.tistory.com/21
이거보는데 안되네요 ㅜ
저 문제가 아닌데? 다시 돌려봐
from urllib.parse import quote_plusfrom bs4 import BeautifulSoupfrom selenium import webdriverbaseUrl = '
https://coinmarketcap.com/ko/currencies/'plusUrl
= input('무엇을 검색할까요? : ')url = baseUrl + quote_plus(plusUrl)driver = webdriver.Chrome()driver.get(url)html = driver.page_sourcesoup = BeautifulSoup(html, 'html.parser')value = soup.select_one('.priceValue___11gHJ').get_text()
이거 아닌가요 ??
다시 글 올릴게요
value.getText() 하면 될텐데
아 파이썬이구나 아무튼 get text 함수 쓰면 입력 텍스트 가져옴