inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

강의에서 소스코드는 어디서 볼 수 있을까요?

미해결

LLM 데이터 분석 - 웹 크롤링부터 추천 시스템까지

찾아봤는데 못찾겠어서 질문 드립니다,,,,

  • 웹-크롤링
  • selenium
  • 추천-시스템
  • 웹-스크래핑
  • llm
  • langchain
조윤수 댓글 1 좋아요 0 조회수 256

텔레그램 sendMessage 시 400에러가 뜹니다.

미해결

실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용

message = input("message: ") data = {"chat_id":chat_id, "text":message} url = f"http://api.telegram.org/bot{bot_token}/sendMessage" res = requests.get(url, data=data) print(res) if res.status_code == 200: print(json.loads(res.text)) 위처럼 작성하고 실행해보면 response 400에러가 발생합니다. getUpdate 메서드는 정상실행이 되는데 뭐가 문제인지 모르겠습니다.... url 공백이 있으면 400에러가 발생한다고 검색은 해봤는데 , 전 공백도 없는것 같고.

  • python
  • 웹-크롤링
  • selenium
  • beautifulsoup
juengwoo kang 댓글 2 좋아요 0 조회수 987

네이버쇼핑 검색창 넘어가기전 팝업창이 안사라져요

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 기본편

다른답변에서 popup_close_button = browser.find_element(By.CSS_SELECTOR, "팝업 닫기 버튼의 CSS 선택자") popup_close_ button.click () 이 방법도 해보고 팝업창 닫기 버튼 browser.find_element(By.XPATH, '/html/body/div[3]/div/div[1]/div/div[4]/div/div/button[1]').click() 이렇게도 입력해 봤는데 계속 사라지지가 않아서 검색 단계로 넘어갈수가 없네요 ㅠㅠㅠㅠㅠ

  • python
  • 웹-크롤링
동그란 강아지 댓글 1 좋아요 0 조회수 420

완성된 코드는 제공되지 않나요?

해결됨

남박사의 파이썬으로 봇 만들기 with ChatGPT

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 강의 자료에는 따로 완성된 코드를 볼 수 있는 자료가 없던데 제공되지 않는건가요?

  • python
  • 웹-크롤링
  • 챗봇
  • 객체지향
  • openai-api
kscr37 댓글 1 좋아요 0 조회수 317

수업중 따라하기 오류 ㅠㅠ

미해결

12시간 안에 끝내는 파이썬을 활용한 크롤링

수업중 seleium 에 관하여 배웠습니다. 하지만 처음부터 뭔가 오류가 나서 잘되지 않네요 selenium은 설치가 잘 된건가요? ModuleNotFoundError NameError은 왜그런거죠?ㅠㅠ 답변 부탁드립니다. ㅠㅠ

  • python
  • 웹-크롤링
여인수 댓글 2 좋아요 0 조회수 273

네이버쇼핑 질문 있습니다!

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

네이버쇼핑크롤링을 연습도중 상품썸네일 링크를 가져와보고싶어서 연습을해봤는데 아래링크처럼했을때 첫번째 상품의 이미지링크만 가져오게되고 나머지 이미지썸네일 링크는 여러가지 다른선택자를 이용해서 시도를 해봤지만 이와같이 한개의 이미지썸네일 링크만 가져와져서 이럴때 어떻게 해야될지 궁금합니다! from selenium import webdriver import time from bs4 import BeautifulSoup import re from urllib.parse import urlparse, urlunparse driver = webdriver.Chrome() driver.get('https://search.shopping.naver.com/search/all?adQuery=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&origQuery=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&pagingIndex=1&pagingSize=40&productSet=overseas&query=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&sort=review&sps=N&timestamp=&viewType=list') last_height = driver.execute_script("return document.body.scrollheight") while True: #스크롤끝까지 내리기 driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") time.sleep(2) new_height = driver.execute_script("return document.body.scrollHeight") if new_height == last_height: break last_height = new_height html = driver.page_source soup = BeautifulSoup(html, 'html.parser') items = soup.select(".product_item__MDtDF") for item in items: # 이미지 URL 찾기 img = item.select_one(".product_img_area__cUrko img") print(img)

  • python
  • 웹-크롤링
댓글 3 좋아요 0 조회수 377

html주소를 다른 컴터에서도 접속하기

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 기본편

html기초 강의에서 만들어진 웹페이지를 제 컴터에서 크롬키고 주소 복붙하면 들어가지는데 핸드폰(아이폰) 크롬앱으로 주소 복붙하면 안들어가지네요 다른 컴터에서도 url만으로 들어가지는 웹을 만들고싶은데..음 웹 강의를 따로 들어야할까요? 아니면 여기서 간단히 무엇만 추가하면 될까요

  • python
  • 웹-크롤링
이주용 댓글 2 좋아요 0 조회수 288

네이버 메일 자동화편 드롭다운 메뉴클릭 부분

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

수업 듣다가 드롭다운 메뉴 클릭 부분에서 NoSuchElementException 오류가 뜨면서 메일 드롭다운 클릭이 안됩니다. 왜이런 걸까요?? #셀레니움 기본 템플릿 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys import time import pyperclip from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC #크롬 드라이버 생성 driver = webdriver.Chrome() #페이지 이동 driver.get("https://nid.naver.com/nidlogin.login?mode=form&url=https://www.naver.com/") time.sleep(0.5) # 아이디 입력 id = driver.find_element(By.CSS_SELECTOR, "#id") pyperclip.copy(user_id) id.send_keys(Keys.CONTROL, 'v') time.sleep(0.5) # 패스워드 입력 pw = driver.find_element(By.CSS_SELECTOR, "#pw") pyperclip.copy(user_pw) pw.send_keys(Keys.CONTROL, 'v') time.sleep(0.5) # 로그인 버튼 클릭 driver.find_element(By.CSS_SELECTOR, "#log\\.login").click() driver.get("https://www.naver.com/") time.sleep(1) #드롭다운 메뉴 클릭 driver.find_element(By.CSS_SELECTOR, "#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM").click() 오류내용 --------------------------------------------------------------------------- NoSuchElementException Traceback (most recent call last) Cell In[34], line 35 33 time.sleep(1) 34 #드롭다운 메뉴 클릭 ---> 35 driver.find_element(By.CSS_SELECTOR, "#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM").click() File c:\Users\LEGION\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py:741, in WebDriver.find_element(self, by, value) 738 by = By.CSS_SELECTOR 739 value = f'[name="{value}"]' --> 741 return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] File c:\Users\LEGION\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\webdriver.py:347, in WebDriver.execute(self, driver_command, params) 345 response = self.command_executor.execute(driver_command, params) 346 if response: --> 347 self.error_handler.check_response(response) 348 response["value"] = self._unwrap_value(response.get("value", None)) 349 return response File c:\Users\LEGION\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\remote\errorhandler.py:229, in ErrorHandler.check_response(self, response) 227 alert_text = value["alert"].get("text") 228 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 229 raise exception_class(message, screen, stacktrace) NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM"} ... (No symbol) [0x00007FF723ECECA2] (No symbol) [0x00007FF723EBE16F] BaseThreadInitThunk [0x00007FFB1DF87344+20] RtlUserThreadStart [0x00007FFB1EA3CC91+33] Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

  • python
  • 웹-크롤링
헉근뎅 댓글 3 좋아요 0 조회수 425

네이버 로그인

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요 네이버 로그인 자동화 프로그램 제작하기편 보고 있는데 똑같이 입력했는데도 자동입력방지가 뜹니다. 왜이런지 알 수 있을까요??#셀레니움 기본 템플릿 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys import time import pyperclip #크롬 드라이버 생성 driver = webdriver.Chrome() #페이지 이동 driver.get("https://nid.naver.com/nidlogin.login?mode=form&url=https://www.naver.com/") time.sleep(1) # 아이디 입력 id = driver.find_element(By.CSS_SELECTOR, "#id") pyperclip.copy(user_id) id.send_keys(Keys.CONTROL, 'v') time.sleep(1) # 패스워드 입력 pw = driver.find_element(By.CSS_SELECTOR, "#pw") pyperclip.copy(user_pw) pw.send_keys(Keys.CONTROL, 'v') time.sleep(1) # 로그인 버튼 클릭 driver.find_element(By.CSS_SELECTOR, "#log\\.login").click()

  • python
  • 웹-크롤링
헉근뎅 댓글 1 좋아요 0 조회수 250

윈도우11

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요~ 크롤링 관심있어서 강의 수강중인데 현재 제 노트북이 win10인데 드라이버등등 이유로 win11로 가려고 해요. 그럴경우 이 강의내용이 맞지 않을 수도 있을까요?

  • python
  • 웹-크롤링
헉근뎅 댓글 1 좋아요 0 조회수 160

자동로그인 구현방법 문의

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

안녕하세요. 네이버 자동로그인 강의를 보고 실습한 뒤 다른사이트(영풍문고) 자동로그인을 구현해보던 중 아이디 입력창의 선택자 확인방법이 네이버와 다른건지 잘 확인이 안되는데 혹시 어떻게 확인하면 될까요? <input name="id" type="text" tabindex="5" maxlength="16" class="textbox focus" style="ime-mode:disabled;" placeholder="아이디" title="아이디" onkeypress="enterSearch();" onfocus="pfocus(this);" onblur="pblur(this);" value="" data-gtm-form-interact-field-id="0">

  • python
  • 웹-크롤링
비니비니 댓글 1 좋아요 0 조회수 260

이렇게 해도 될까요 ?

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

purchase = int(purchase.replace("만","000").replace(".","")) 이런식으로 작성해도 될까요 ?

  • python
  • 웹-크롤링
hm_stom 댓글 2 좋아요 0 조회수 206

질문있습니다.

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

#클래스명은 주기적으로 바뀔듯 따라서 정규표현식으로 필터링 #광고상품 제거 일반 상품만 products = soup.find_all('div',class_=re.compile('^product_item__')) print(f"Number of products found: {len(products)}") 이런식으로 뒤에 uuid값이 바뀌는 상황을 고려하여 광고 상품 클래스명인 adProduct를 제외하고 일반 상품만 가져오고 싶은데 길이가 자꾸만 13개로 나오는데.. 다른 코드를 작성해야 할까요 ?

  • python
  • 웹-크롤링
hm_stom 댓글 1 좋아요 0 조회수 136

웨일도 가능한가요?

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

자동화를 하려고 하는데 웨일도 가능한가요?자꾸만 크롬이 켜져서 ,,

  • python
  • 웹-크롤링
hm_stom 댓글 1 좋아요 0 조회수 330

range를 꼭 써야하나요 ?

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

for i in (1,2): 2페이지까지 도는 문법이 이렇게만 작성해도 되던데 range를 꼭 적어줘야하나요 ?

  • python
  • 웹-크롤링
hm_stom 댓글 1 좋아요 0 조회수 185

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

갑자기 앞뒤 설명없이 코딩이 시작되는데 뭘 설치하는지 어떻게 다음 라인으로 넘어가는지 전혀 나와있지 않은데요..;;

  • python
  • 웹-크롤링
hm_stom 댓글 2 좋아요 0 조회수 174

Exercise 40번) 질문 reverse() 함수 질문

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

Exercise 40번 질문(영상시간 15:13) 안녕하세요! 반복문 안에서 바로 reverse()함수 사용하여 역방향으로 만들어 실행해보려고 했는데 오류가 나네요..! 아래와 같은 코드로 실행했는데 왜 오류가 날까요~? for i in data.reverse(): print(i)

  • python
  • 웹-크롤링
해리문 댓글 2 좋아요 0 조회수 233

[Jupyter Note] shift+enter 오류

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

Jupyter note에서 갑자기 마크다운 입력한 셀이 shift+enter가 안 먹는데 어떻게 해결할 수 있나요?

  • python
  • 웹-크롤링
jung.sooah 댓글 2 좋아요 0 조회수 626

ftp 로긴 문제입니다. ㅜ

미해결

실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용

강의 내용 외 개인적인 실습 사이트의 질문은 답변이 제공되지 않습니다. 문제가 생긴 코드, 에러 메세지 등을 꼭 같이 올려주셔야 빠른 답변이 가능합니다. 코드를 이미지로 올려주시면 실행이 불가능하기 때문에 답변이 어렵습니다. 답변은 바로 제공되지 않을 수 있습니다. 실력 향상을 위해서는 직접 고민하고 검색해가며 해결하는 게 가장 좋습니다. 쿠팡 아이템 리스트를 html로 작성해서 호스팅 주소에 올리는 과정입니다. 파이썬 파일 돌리면 로그인 과정에서 실패합니다. 주소 id pw는 제대로 입력한 것 확인 했는데 무엇이 문제인지 알려주세요...

  • python
  • 웹-크롤링
  • selenium
  • beautifulsoup
juengwoo kang 댓글 2 좋아요 0 조회수 469

NoSuchElementException 에러 해결은 되었는데, 정확한 원인은 ㅠㅠ

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

#드롭다운 메뉴 클릭 driver.find_element(By.CSS_SELECTOR,"#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM").click() CSS selector 제대로 한것 같은데 실행하면 하기와 같이 에러 발생합니다. 도움 부탁드립니다. --------------------------------------------------------------------------- NoSuchElementException Traceback (most recent call last) Cell In[5], line 1 ----> 1 driver.find_element(By.CSS_SELECTOR,\"#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM\").click() File c:\\Users\\visio\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:741, in WebDriver.find_element(self, by, value) 738 by = By.CSS_SELECTOR 739 value = f'[name=\"{value}\"]' --> 741 return self.execute(Command.FIND_ELEMENT, {\"using\": by, \"value\": value})[\"value\"] File c:\\Users\\visio\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:347, in WebDriver.execute(self, driver_command, params) 345 response = self.command_executor.execute(driver_command, params) 346 if response: --> 347 self.error_handler.check_response(response) 348 response[\"value\"] = self._unwrap_value(response.get(\"value\", None)) 349 return response File c:\\Users\\visio\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py:229, in ErrorHandler.check_response(self, response) 227 alert_text = value[\"alert\"].get(\"text\") 228 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 229 raise exception_class(message, screen, stacktrace) NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"#account > div.MyView-module__my_menu___eF24q.MyView-module__is_open____qWM1 > div > div > ul > li:nth-child(1) > a > span.MyView-module__item_text___VTQQM\"} (Session info: chrome=125.0.6422.176); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception Stacktrace: \tGetHandleVerifier [0x00007FF7C22C1F52+60322] \t(No symbol) [0x00007FF7C223CEC9] \t(No symbol) [0x00007FF7C20F7EBA] \t(No symbol) [0x00007FF7C2147676] \t(No symbol) [0x00007FF7C214773C] \t(No symbol) [0x00007FF7C218E967] \t(No symbol) [0x00007FF7C216C25F] \t(No symbol) [0x00007FF7C218BC80] \t(No symbol) [0x00007FF7C216BFC3] \t(No symbol) [0x00007FF7C2139617] \t(No symbol) [0x00007FF7C213A211] \tGetHandleVerifier [0x00007FF7C25D94AD+3301629] \tGetHandleVerifier [0x00007FF7C26236D3+3605283] \tGetHandleVerifier [0x00007FF7C2619450+3563680] \tGetHandleVerifier [0x00007FF7C2374326+790390] \t(No symbol) [0x00007FF7C224750F] \t(No symbol) [0x00007FF7C2243404] \t(No symbol) [0x00007FF7C2243592] \t(No symbol) [0x00007FF7C2232F9F] \tBaseThreadInitThunk [0x00007FF81527257D+29] \tRtlUserThreadStart [0x00007FF8161EAF28+40] "

  • python
  • 웹-크롤링
송내 댓글 3 좋아요 0 조회수 686

인기 태그

인프런 TOP Writers

주간 인기글