묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
구글 이미지 링크 추출 오류!
늘 좋은 강의 잘 듣고 있습니다!! 이해 할때까지 반복 연습중인데.. 에러 가 자꾸나서 확인 부탁드립니다 실행 코드 from selenium import webdriver import time from selenium.webdriver.common.keys import Keys import os import urllib.request if not os.path.exists('인프런유료chapter05/고양이'): os.mkdir('인프런유료chapter05/고양이') url = f"https://www.google.com/search?q=%EA%B3%A0%EC%96%91%EC%9D%B4&hl=en&sxsrf=APq-WBtpNohfQWx-Rbg-cQ9NS2_CSdScmQ:1649047497463&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiggrfSzPn2AhXPD94KHdkUDcUQ_AUoAXoECAIQAw&biw=1291&bih=934&dpr=1" browser = webdriver.Chrome("C:\startcoding\chromedriver.exe") browser.implicitly_wait(10) browser.maximize_window() browser.get(url) # 무한스크롤 구문 # 스크롤 전 높이 before_h = browser.execute_script("return window.scrollY") # 무한 스크롤 while True : # 맨 아래로 스크롤을 내린다 browser.find_element_by_css_selector("body").send_keys(Keys.END) # 스크롤 사이 페이지 로딩 시간 time.sleep(1) # 스크롤 후 높이 after_h = browser.execute_script("return window.scrollY") if after_h == before_h: break before_h = after_h #이미지 추출 imgs = browser.find_elements_by_css_selector(".rg_i.Q4LuWd") # class가 띄어 쓰기 있는 경우 .으로 대체하고 맨 앞에서 .붙인다 for i, img in enumerate(imgs,1): # 이미지를 클릭해서 큰 사이즈를 찾아줘라 img.click() time.sleep(1) # 큰이미지 추출 target = browser.find_element_by_css_selector("img.n3VNCb") img_src = target.get_attribute('src') # 이미지 다운로드 # 크롤링 하다보면 HTTP Error 403: Forbidden 에러가 납니다 opener = urllib.request.build_opener() opener.addheaders = (['User-Agent','Mozila/5.0']) urllib.request.install_opener(opener) #url 이미지 저장하기 urllib.request.urlretrieve(img_src, f'인프런유료chapter05/고양이/{i}.jpg') 오류 C:\startcoding>C:/Users/hellonature/AppData/Local/Programs/Python/Python310/python.exe c:/startcoding/인프런유료chapter05/08.구글이미지주소추 출.py c:\startcoding\인프런유료chapter05\08.구글이미지주소추출.py:13: DeprecationWarning: executable_path has been deprecated, please pass in a Service object browser = webdriver.Chrome("C:\startcoding\chromedriver.exe") DevTools listening on ws://127.0.0.1:54093/devtools/browser/39af353b-7fc6-4b96-a4e0-1e656c87d831 c:\startcoding\인프런유료chapter05\08.구글이미지주소추출.py:25: DeprecationWarning: find_element_by_css_selector is deprecated. Please use find_element(by=By.CSS_SELECTOR, value=css_selector) instead browser.find_element_by_css_selector("body").send_keys(Keys.END) c:\startcoding\인프런유료chapter05\08.구글이미지주소추출.py:38: DeprecationWarning: find_elements_by_css_selector is deprecated. Please use find_elements(by=By.CSS_SELECTOR, value=css_selector) instead imgs = browser.find_elements_by_css_selector(".rg_i.Q4LuWd") # class가 띄어 쓰기 있는 경우 .으로 대체하고 맨 앞에서 .붙인다 c:\startcoding\인프런유료chapter05\08.구글이미지주소추출.py:46: DeprecationWarning: find_element_by_css_selector is deprecated. Please use find_element(by=By.CSS_SELECTOR, value=css_selector) instead target = browser.find_element_by_css_selector("img.n3VNCb") Traceback (most recent call last): File "c:\startcoding\인프런유료chapter05\08.구글이미지주소추출.py", line 57, in <module> urllib.request.urlretrieve(img_src, f'인프런유료chapter05/고양이/{i}.jpg') File "C:\Users\hellonature\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 241, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Users\hellonature\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen return opener.open(url, data, timeout) File "C:\Users\hellonature\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 516, in open req = meth(req) File "C:\Users\hellonature\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 1300, in do_request_ for name, value in self.parent.addheaders: ValueError: too many values to unpack (expected 2) C:\startcoding>[20968:20972:0404/150023.007:ERROR:device_event_log_impl.cc(214)] [15:00:23.007] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: 시스템에 부착된 장치가 작동하지 않습니다. (0x1F) [20968:20972:0404/150023.007:ERROR:device_event_log_impl.cc(214)] [15:00:23.008] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: 시스템에 부착된 장치가 작동하지 않습니다. (0x1F) C:\startcoding>[21456:16916:0404/150208.726:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled, ANGLE is
-
미해결15일간의 빅데이터 파일럿 프로젝트
배치형 대규모 데이터 적재 관련 질문
안녕하세요, 배치형 데이터 적재 관련해서 질문 드립니다. 배치형 데이터의 경우 Flume이 모니터링 하는 SpoolDir로 데이터가 들어와야 hdfs로 적재가 되는데, 1일 단위로 데이터가 발생하는 현재 상황에서 매일 txt 파일을 spooldir로 직접 mv 해줘야하는 건가요?? 감사합니다.
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part2: 게임 수학과 DirectX12
깃허브 관련해서 문의드릴게있습니다!
안녕하세요 루키스님! 좋은 강의 잘 듣고 있습니다. 다름이 아니라 강의를 듣다보니 하나의 프로젝트를 계속 고쳐나가는데, 개인적으로 정리를 하다보니 좀 불편해져서 이왕 정리하는거 깃허브로 버전관리하는것도 익혀보자 싶어서 해당 강의코드를 깃허브에 올려서 정리해보고 싶은데 코드를 올려도 괜찮을까요???
-
미해결면접과 취업을 부르는 '퍼블리셔 개인 포트폴리오 홈페이지' 제작
포트폴리오 만들때 홈페이지 내용을 영어로 해도 될까요?
국비지원을 수강하면서 선생님 강의도 같이 잘 듣고 있습니다. 다름이 아니라 포트포리오를 위해 작업물을 만드는데 작업물 내용이 영어여도 상관없을까요?? 아 그리고 포트폴리오를 만들려고 하는데 제가 하려고 하는 방식이 맞는지 잘 모르겠습니다. 어떻게 하냐면 1. 테마포레스트, 선생님 강의에 나온 웹사이트 레이아웃 등을 참고하여 포토샾으로 와이어프레임을 만든다. 2. 들어갈 텍스트와 이미지를 구해서, 시안을 만든다. 3. 기능정의서를 작성한다. 4. 퍼블리싱한다. 이렇게 제 임의로 창작해서 포트폴리오를 만들어도 상관없을까요? 와이어프레임 만들때는 잘만들어진 UI들을 들고와서 짜집기해서 만들고있습니다..
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
home.html 연결 문제
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오) 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)예[질문 내용]restart 하고 localhost:8080으로 확인해보면 이전에 index.html파일로 연결되는데 이런 문제는 어떻게 해결해야할까요? HomeController.java home.html 화면 MemberService.java MemberController.java
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
raycast 관련 질문입니다.
커서를 설정할 때 레이를 쏴서 hit을 통해 hit을 당한 그 게임 오브젝트가 무엇인지에 따라 커서의 상태를 변경하는 것으로 이해했습니다. 그런데 여기서 레이캐스트는 마우스를 클릭했을 때 레이가 발사되어 hit을 얻어오는 것으로 이해했는데, 게임을 시작하고 아무 곳도 클릭하지 않았는데 왜 기본커서가 Hand로 설정되어 있는지 궁금합니다. 그냥 레이캐스트는 클릭을 하지 않아도 마우스 포지션에 따라서 정보를 얻어오는건가요??
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
express는 WAS(Web Application Server) 인가요?
안녕하세요? Spring에서 NestJS로 전향하기 위해서 강의를 열심히 듣고 있습니다. nodejs나 nestjs를 공부하면서 express가 WAS인가 하는 궁금증이 들었습니다. Node.js는 Javascript의 런타임 이고, express라는 웹 프로엠워크 이용하여 Web Application 구동해준다 라고 생각을 합니다만 express를 was라고 생각해도 맞는 걸까요 ?
-
미해결파이썬(Python) 기초부터 실무까지 part.4
2. 특수 메소드/ 3) 특수 메소드를 이용한 사례에 대해서
class Book: def __init__(self, title, author, pages): self.title = title self.author = author self.pages = pages def __str__(self): return f"제목 : {self.title}, 저자 : {self.author}, 페이지 : {self.pages}" def len(self): return self.pages book = Book("Data Structure", "Chun", 650) print(book) print(len(book)) 위의 코드로 출력시 >>> TypeError: object of type 'Book' has no len() 위의 오류가 출력되는데 저의 경우에는 해당 오류 코드를 print(book.len())으로 변경하여 출력하였는데 이렇게 하는게 맞는지 궁금하여 글을 한번 남겨봅니다.
-
해결됨비전공자를 위한 진짜 입문 올인원 개발 부트캠프
TypeError: Cannot read properties of undefined (reading 'map')
React로 웹 개발하기 - 2 수강후 에러 메시지 문의입니다. npm start 하여 로컬호스트 화면에 아래의 메시지가 나오는데 해결이 안됩니다. 어디에 문제가 있는건지 문의드립니다. × TypeError: Cannot read properties of undefined (reading 'map') MainPage C:/Users/hanthene/Documents/github/grab-market-web/src/main/index.js:33 30 | <img src="images/banners/banner1.png" /> 31 | </div> 32 | <h1>판매되는 상품들</h1>> 33 | <div id="product-list"> | ^ 34 | {products.map(function(product, index) { 35 | return ( 36 | <div className="product-card">View compiled ▶ 18 stack frames were collapsed. (anonymous function) C:/Users/hanthene/Documents/github/grab-market-web/src/main/index.js:15 12 | .then(function(result){ 13 | console.log(result); 14 | const products = result.data.products;> 15 | setProducts(products); | ^ 16 | }) 17 | .catch(function(error){ 18 | console.error('에러 발생 : ',error);View compiled This screen is visible only in development. It will not appear if the app crashes in production.Open your browser’s developer console to further inspect this error. 에러가 나는 상태의 파일 그대로 GITHUB에 퍼블릭으로 올려놓았습니다. https://github.com/ucoder-git/grab-market-client 아래는 package.json 입니다. { "name": "grab-market-web", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.3", "@testing-library/react": "^12.1.4", "@testing-library/user-event": "^13.5.0", "axios": "^0.26.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-scripts": "^2.1.3", "web-vitals": "^2.1.4" }, 아래는 src폴더의 index.js 파일입니다. import React from 'react'; import './index.css'; import axios from "axios"; function MainPage() { const [products, setProducts]= React.useState([]); React.useEffect(function() { axios .get( "https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js" ) .then(function(result){ console.log(result); const products = result.data.products; setProducts(products); }) .catch(function(error){ console.error('에러 발생 : ',error); }); }, []); return ( <div> <div id="header"> <div id="header-area"> <img src="images/icons/logo.png" /> </div> </div> <div id="body"> <div id="banner"> <img src="images/banners/banner1.png" /> </div> <h1>판매되는 상품들</h1> <div id="product-list"> {products.map(function(product, index) { return ( <div className="product-card"> <div> <img className="product-img" src={product.imageUrl} /> </div> <div className="product-contents"> <span className="product-name">{product.name}</span> <span className="product-price">{product.price}원</span> <div className="product-seller"> <img className="product-avatar" src="images/icons/avatar.png" /> <span>{product.seller}</span> </div> </div> </div> ); })} </div> </div> <div id="footer"></div> </div> ); } export default MainPage;
-
미해결
pro coinbase exchange
+1 855 300 1590 Besides, you have the likelihood to synchronize Coinbase with the web. This implies you can connect the application to your financial balance and have nothing to stress over, as you can either set your secret key or square the application on the off chance that your telephone is lost. Additionally, it permits pro coinbase exchange you to constantly have an eye on your cryptos by means of an outline (clear and instinctive costs and upsides of your resources) that you have readily available consistently. What's more, the acknowledged digital currencies are: Bitcoin (BTC), Bitcoin Cash (BCH), Ethereum (ETH), Ethereum Classic (ETC), Litecoin (LTC), Basic Attention Token (BAT), 0x, (ZRX), Zcash (ZEC)* ETG USD Coin (USDC).
-
미해결
coinbase app download for pc
+1 855 300 1590 It's the world's biggest cryptographic money trade stage with north of 25 million clients across 32 nations around the world. It is the most prescribed application to deal with your electronic wallets and this with an elevated degree of safety. Most importantly, with it, you have the coinbase app download for pc likelihood to continually have your record on you for purchasing, keeping, getting and moving your electronic monetary forms and this securely through your telephone. All you want is a financial balance and a Visa.
-
미해결
coinbase sign up
+1 855 300 1590 Coinbase is the easiest way to buy Ethereum Bitcoin and Litecoin online To get started all you need is a bank account and an email address #Meta Desc The jibrel network provides coinbase sign up traditional financial assets such as currencies bonds and equities as standard ERC-20 tokens on the ethereum blockchain. Coinbase is a digital currency exchange headquartered in San Francisco California They broker exchanges of Bitcoin Bitcoin Cash Ethereum and Litecoin with fiat currencies in around 32 countries and bitcoin transactions and storage in 190 countries worldwide Coinbase was founded in June 2012 by Brian Armstrong and Fred Ehrsam.
-
해결됨디자이너와 협업할 때 유용한 툴, 피그마 속성 강좌
피그마 파일 개발자 html/css 등 소스 확인 문의
안녕하세요. 강의를 다운받아서 확인하였는데 혹시 개발자가 디자이너에게 피그마 파일을 받았을 때 간단한 css만 확인하는게 아니라 html/css 같은 구조를 소스로 확인하는 방법은 없나요? 제가 찾아보기로는 플러그인을 사용하여 하는 방법이 있는데 혹시 이런 경우 뷰어모드가 아닌 에디터 모드일때만 플러그인 사용이 가능한건지도 궁금합니다.
-
미해결윤재성의 Google 공식 언어 Kotlin 프로그래밍 시작하기
it
8분 6초쯤 it 라는 명령어를 사용하셧는데.. 저번 시간 고차함수 배울때 매개변수 하나를 받는 함수를 매개변수로 받는 함수 가 it 를 사용 할수 있다고 하셨는데... 함수를 정의하지도 않았는데 it를 어떻게 사용이 가능한거죠??
-
미해결자바 스프링부트 활용 웹개발 실무용
아무리해봐도 해결이되지않네요 ㅠ
ㅇ일단 영상과 똑같이 진행하였고 localhost로 보드를 불러오면 안에 내용이 영상처럼 나오지 않았는데 이는 db에 먼등록되는 과정이 없어서 이렇게 나오는것 같아 save를 진행하면 보이겠지하고 save를 진행을하면 이런화면이 나옵니다.. ㅠ 어디서부터 손대야할지 모르겠네요.. 초보자라... 다음으로 넘어가고싶은데 에러때문에 진도를나갈수가없어요 ㅠ
-
미해결Slack 클론 코딩[실시간 채팅 with React]
프론트부분만 따라만드려면
안녕하세요! 강의 잘 듣고 있습니다. 프론트엔드 부분만 따라만드려고 하는데 백엔드 설정은 back폴더만 다운받고, 다른건 아무것도 없는 상태에서 프론트엔드 직접 설정해서 시작하면 될까요?(cra없이) (백엔드 서버는 그대로 쓰고, 프론트는 직접 설정부터 하려면 back폴더만 다운받아서 시작하면 되는지 궁금합니다)
-
미해결시스템엔지니어가 알려주는 리눅스 실전편 Bash Shell Script
설치 문제 (rockylinux/8 v5.0.0 문제)
설치 중 문제가 있습니다. 다른 pc 에 환경 구성하여 하다가 업무용 pc 라 사용에 제한이 있어 집에서 구축하는데 안되네요. rockylinux/8 v.5.0.0 문제로 보이는데, 이전 버전을 사용하여 실습할 수 있는지, 가능하다면 방법 문의 드립니다. 보다시피 5.0.0 의 다운로드 문제로 확인되며, 웹브라우져에서 시도시에도 안됩니다. 하지만 아래 주소에서 4.0 대는 잘 다운로드 되는 것 같습니다. https://app.vagrantup.com/rockylinux/boxes/8 https://app.vagrantup.com/rockylinux/boxes/8/versions/4.0.0/providers/virtualbox.box 회사에서 정한 학습 기간이 있어 위 주소에서 해결되길 마냥 기다릴 수 없습니다. 이전버전으로라도 가능한지, 가능하다면 어디를 수정하면 될 지 확인 부탁 드립니다.
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
에러 구문 질문 드립니다.
SyntaxError: unexpected EOF while parsing 는 따옴표 및 괄호의 여닫기가 제대로 이루어 지지 않았을 때 발생하는것으로 알고 있습니다. 같은 구문을 복사 붙여넣기 했는데도 형광 표시된 부분에서 에러가 나는데 어떻게 수정을 해야 할까요 ..?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
상태 관리에 대해 질문드립니다 !
항상 좋은 강의 감사드립니다. 현재 nodebird 프로젝트를 redux 대신 react-query과 recoil을 사용하여 리팩토링 해보았습니다. 제로초님의 경우 react-query와 redux-toolkit으로 나눠 client state와 server state를 분리하셨다고 들었습니다. 질문1. 저는 유저정보의 경우 상위 컴포넌트에서 server state 에서 받아온 후 client state의 넣어놓고 계속 사용하는 방식으로 진행해보았습니다. 유저정보(server state)를 처음 호출할 때 redux(저는 recoil 사용하였습니다)를 통하여 비동기로 받아와서 사용하는 것과 react-query로 server state(react-query)를 받아온 후 client state(recoil)에 넣어주는 것 어떤것이 맞는걸까요? server state는 모두 react-query에 맡긴다고 생각하면 후자가 맞다고 생각하여 이렇게 진행하였는데 비효율적인 것 같다는 생각이 들었습니다... 질문2. server state와 client state를 나누시는 이유는 위에 상황처럼 사용하기 위해서 인가요? 아니면 다른 이유가 있으신가요? 저는 컴포넌트에서 user 정보가 필요할 때마다 react-query로 호출하면 낭비가 일어나는 것 같아서 client state 용 recoil을 사용하였는데 이렇게 사용하는 것이 맞는지 의문이 들어서 질문드립니다 ! 감사합니다 !
-
미해결스프링 부트 개념과 활용
pom 테그 에러
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spriog-boot-autoconfigure</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure-processor</artifactId> <optional>true</optional> </dependency></dependencies> Cannot resolve org.springframework.boot:spriog-boot-autoconfigure:unknown 라는 오류가 나는데 jar파일이 없어서 나는것같습니다.. 따로 다운을 받아야하는건지..