174만명의 커뮤니티!! 함께 토론해봐요.
미해결
파이썬 무료 강의 (활용편3) - 웹 스크래핑 (5시간)
이렇게 하면 왜 print들이 다 빈 리스트로 뜨나요? 격자형으로 하면 잘 되던데... import requests import re from bs4 import BeautifulSoup url = "https://search.shopping.naver.com/search/all?frm=NVSCPRO&origQuery=%EA%B3%B1%EC%B0%BD&pagingIndex=1&pagingSize=40&productSet=total&query=%EA%B3%B1%EC%B0%BD&sort=rel×tamp=&viewType=thumb" res = requests.get(url) res.raise_for_status() soup = BeautifulSoup(res.text, "lxml") # 네이버쇼핑 리스트형 items = soup.find_all("li", attrs={"class":re.compile("^basicList_item__0T9JD")}) title = soup.find_all("div", attrs={"class":re.compile("^basicList_title__VfX3c")}) print(items) print(title)
웹 스크래핑 웹-크롤링 selenium python
9279482
2022-08-26T16:54:05.195Z
댓글 0
좋아요 0
조회수 410
미해결
다양한 사례로 익히는 SQL 데이터 분석
안녕하세요 선생님:) 다름이 아니라 ntile(5) over (order by)에서 rows between unbounded preceding and unbounded following 관련 질문이 있습니다. 혹시 rows between - 을 붙이지 않는다면 값이 드라마틱하게 바뀌는지 궁금하여 질문 드려요.
DBMS/RDBMS postgresql sql 데이터 엔지니어링 퍼포먼스 마케팅
최원빈
2022-08-26T16:40:07.826Z
댓글 1
좋아요 0
조회수 184
미해결
홍정모의 따라하며 배우는 C언어
질문1 char(*complicated_function1())[3] 함수는 char3 포인터를 반환해주는 함수인 것은 알겠습니다. 그런데 이 선언을 해석할때 complicated_function1()이 *포인터를 반환하고 이것이 가리키는 것이 char[3]배열이다. 이렇게 해석하면 맞는 것인가요? 질문2 보통 함수를 선언할때 double average(double , double)와 같이 선언하는데 배열의 포인터를 반환할때는 char(*complicated_function1())[3]와 같이 [3]부분을 마지막에 써 준다는 것으로 이해하면 되는것인가요? 질문3 char(*complicated_function1())[3]은 char(*)[3]함수 안에 입력으로 complicated_function1()함수를 가지는 것인가요? (자주 질문해서 번거로우실텐데 항상 친절히 답변해주셔서 감사합니다)
성종영
2022-08-26T16:00:32.148Z
댓글 1
좋아요 0
조회수 186
미해결
스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
ServletApplication에서 run을 돌렸을때 tomcat오류가 뜹니다. 이클립스와 인텔리제이를 모두 사용중이라 오류가 있어 환경변수를 바꿨다가 다시 11.0.2로 돌아와도 오류가 사라지지않네요 .. 인텔리제이에서는 포트번호 변경해서 사용중입니다. 2022-08-27 00:29:08.038 INFO 11488 --- [ main] hello.servlet.ServletApplication : Starting ServletApplication using Java 11.0.2 on LAPTOP-1MO5SDCA with PID 11488 (C:\Users\bh011\IntellJ-servelt\servlet\out\production\classes started by bh011 in C:\Users\bh011\IntellJ-servelt\servlet) 2022-08-27 00:29:08.041 INFO 11488 --- [ main] hello.servlet.ServletApplication : No active profile set, falling back to 1 default profile: "default" 2022-08-27 00:29:08.943 INFO 11488 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http) 2022-08-27 00:29:08.952 INFO 11488 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2022-08-27 00:29:08.952 INFO 11488 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65] 2022-08-27 00:29:09.029 INFO 11488 --- [ main] o.a.c.c.C.[Tomcat].[ localhost ].[/] : Initializing Spring embedded WebApplicationContext 2022-08-27 00:29:09.029 INFO 11488 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 930 ms 2022-08-27 00:29:09.060 ERROR 11488 --- [ main] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: java.lang.IllegalArgumentException. Message: Invalid <url-pattern> [servlet/members/new-form] in servlet mapping 2022-08-27 00:29:09.075 INFO 11488 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2022-08-27 00:29:09.082 WARN 11488 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat 2022-08-27 00:29:09.089 INFO 11488 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-08-27 00:29:09.113 ERROR 11488 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh( ServletWebServerApplicationContext.java:165 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.context.support .AbstractApplicationContext.refresh( AbstractApplicationContext.java:577 ) ~[spring-context-5.3.22.jar:5.3.22] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh( ServletWebServerApplicationContext.java:147 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.SpringApplication.refresh( SpringApplication.java:734 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.SpringApplication.refreshContext( SpringApplication.java:408 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:308 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:1306 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.SpringApplication.run ( SpringApplication.java:1295 ) ~[spring-boot-2.7.3.jar:2.7.3] at hello.servlet.ServletApplication.main( ServletApplication.java:12 ) ~[classes/:na] Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize( TomcatWebServer.java:142 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>( TomcatWebServer.java:104 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer( TomcatServletWebServerFactory.java:479 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer( TomcatServletWebServerFactory.java:211 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer( ServletWebServerApplicationContext.java:184 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh( ServletWebServerApplicationContext.java:162 ) ~[spring-boot-2.7.3.jar:2.7.3] ... 8 common frames omitted Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> [servlet/members/new-form] in servlet mapping at org.apache.catalina.core.StandardContext.addServletMappingDecoded( StandardContext.java:3233 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.Context.addServletMappingDecoded( Context.java:905 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.ApplicationServletRegistration.addMapping( ApplicationServletRegistration.java:193 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.springframework.boot.web.servlet.ServletRegistrationBean.configure( ServletRegistrationBean.java:194 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.ServletRegistrationBean.configure( ServletRegistrationBean.java:51 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.DynamicRegistrationBean.register( DynamicRegistrationBean.java:113 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.RegistrationBean.onStartup( RegistrationBean.java:53 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize( ServletWebServerApplicationContext.java:237 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup( TomcatStarter.java:53 ) ~[spring-boot-2.7.3.jar:2.7.3] at org.apache.catalina.core.StandardContext.startInternal( StandardContext.java:5219 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:183 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.ContainerBase$StartChild.call( ContainerBase.java:1396 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.ContainerBase$StartChild.call( ContainerBase.java:1386 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at java.base/java.util.concurrent.FutureTask.run( FutureTask.java:264 ) ~[na:na] at org.apache.tomcat.util.threads.InlineExecutorService.execute( InlineExecutorService.java:75 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at java.base/java.util.concurrent.AbstractExecutorService.submit( AbstractExecutorService.java:140 ) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal( ContainerBase.java:919 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.StandardHost.startInternal( StandardHost.java:835 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:183 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.ContainerBase$StartChild.call( ContainerBase.java:1396 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.ContainerBase$StartChild.call( ContainerBase.java:1386 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at java.base/java.util.concurrent.FutureTask.run( FutureTask.java:264 ) ~[na:na] at org.apache.tomcat.util.threads.InlineExecutorService.execute( InlineExecutorService.java:75 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at java.base/java.util.concurrent.AbstractExecutorService.submit( AbstractExecutorService.java:140 ) ~[na:na] at org.apache.catalina.core.ContainerBase.startInternal( ContainerBase.java:919 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.StandardEngine.startInternal( StandardEngine.java:265 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:183 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.StandardService.startInternal( StandardService.java:432 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:183 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.core.StandardServer.startInternal( StandardServer.java:930 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:183 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.apache.catalina.startup.Tomcat.start( Tomcat.java:486 ) ~[tomcat-embed-core-9.0.65.jar:9.0.65] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize( TomcatWebServer.java:123 ) ~[spring-boot-2.7.3.jar:2.7.3] ... 13 common frames omitted Process finished with exit code 1
2022-08-26T15:43:59.873Z
댓글 1
좋아요 1
조회수 12357
미해결
실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
안녕하세요. 강의를 듣던중 테스트와 관련해서 한가지 궁금한 점이 있어서 질문 남깁니다. 일단 저는 현업에서 @SpringBootTest 를 사용하지 않고 서비스 계층은 목킹을 해서 별도의 스프링 컨텍스트를 사용하지 않고 테스트를 하고 있습니다. 문제는 컨트롤러 계층을 테스트 할 때인데요. @WebMvcTest 로 테스트를 할 때 하나의 컨트롤러를 테스트 할때는 상관이 없지만 통합테스트 형태로 모든 테스트를 실행시에는 @WebMvcTest 가 각각 달린 컨트롤러 테스트마다 별도의 스프링 컨텍스트가 뜨기 때문에 테스트가 느려지는데요. (모든 컨트롤러 테스트가 같은 빈 조합을 사용한다면 같은 컨텍스트를 사용하겠지만 그런 경우는 거의 없기 때문에 각각의 테스트 클래스마다 대부분 스프링 컨텍스트가 새로 뜨는거 같습니다.) 그래서 하나의 추상 컨트롤러 테스트에만 @WebMvcTest 를 달고 여기에 모든 테스트 대상 컨트롤러를 다 추가하고 이 추상 클래스를 상속받아 각각의 테스트 클래스를 사용하고 있습니다. 그래서 전체 테스트 시에는 테스트 속도가 빠라졌지만, 이렇게 하다보니 하나의 컨트롤러 테스트를 할 때도 상속받은 추상클래스에 있는 모든 테스트 컨트롤러가 다 임포트 되어 하나의 컨트롤러 테스트가 너무 느려졌고, 단위 테스트의 의미가 사라지는거 같습니다. 혹시 이와 관련해서 좋은 방법이 없을까 해서 질문을 남깁니다. 그리고 @SpringBootTest 시에는 각각의 테스트 말고 전체를 테스트 할 때 @WebMvcTest 를 할 때처럼 스프링 컨텍스트가 여러개 떠서 테스트 속도가 느려지는 문제가 없을까요? 항상 @SpringBootTest 는 무겁다는 생각 때문에 잘 사용을 안해서 궁금하네요. 그리고 현업에서 @SpringBootTest 를 자주 사용하는지도 궁금합니다. 저는 주로 @WebMvcTest, @DataJpaTest 이정도를 사용하고 도메인 계층은 일반 클래스 처럼, 서비스 계층은 모킹만 해서 스프링 도움없이 테스트를 하고 있습니다.
refactoring java kotlin spring spring-boot
opensesame
2022-08-26T15:20:43.129Z
댓글 1
좋아요 4
조회수 1079
미해결
디스이즈 디스커버 디스코드 파이썬봇
error: Exception has occurred: PrivilegedIntentsRequired Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead. 조언 부탁 드리겠습니다.
김규민
2022-08-26T15:08:15.538Z
댓글 1
좋아요 0
조회수 1680
미해결
호돌맨의 요절복통 개발쇼 (SpringBoot, Vue.JS, AWS)
안녕하세요. 혼자 고민해봐도 답이 안나와서 문의를 드리게 되었습니다..! 호돌맨님께서는 페이징을 할 때 Pageable 객체를 잘 사용하지 않고, PageSearch 같은 커스텀 객체와 QueryDSL을 이용하여 직접 구현 하여 사용한다고 하셨는데, 혹시 특별한 이유가 있으신지가 너무 궁금합니다.
Spring Security spring-boot aws JPA vuejs
딱구
2022-08-26T14:30:19.223Z
댓글 2
좋아요 2
조회수 715
미해결
따라하면서 배우는 고박사의 유니티 기초
UnityEngine.Debug.Log("Awake 함수가 실행되었습니다."); 이렇게 적어보세요 됩니다
Sian Lee
2022-08-26T14:08:25.155Z
댓글 1
좋아요 0
조회수 272
미해결
윈도우 사용하는데 저렇게 gradle 파일제목 글씨가 빨간색인데 작동은 정상적으로 됩니다 그냥 거슬려서 그런데 왜 빨간색으로 뜨는걸까요? 신경 안써도 되는건가요?
gelab
2022-08-26T14:00:48.398Z
댓글 0
좋아요 0
조회수 453
미해결
실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
@GetMapping("/members/new") public String createForm(Model model){ model.addAttribute("memberForm", new MemberForm()); return "members/createMemberForm"; } model.addAttribute를 사용하지 않고 일단 createMemberForm.html로 간 뒤에 form post로 데이터를 넘기면 @PostMapping("/members/new") 컨트롤러가 비즈니스로직을 수행하면 되는 것 아닌가요? createMemberForm이라는 html 에 new MemberForm()으로 객체를 넘길 수 있는 내부적인 원리 가 궁금합니다.
웹앱 JPA spring-boot java spring
taeu kim
2022-08-26T11:42:35.038Z
댓글 1
좋아요 3
조회수 611
미해결
[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part2: 게임 수학과 DirectX12
사소한 부분이라 넘어가도 됐을 것 같은데.. currentIndex 를 잘못 이해하고 있는건가 싶어서 여쭤 봅니다. ConstantBuffer::PushData 맴버 함수에서 assert(_currentIndex < _elementSize); currentIndex 와 elementSize를 비교하는데, elementCount랑 비교하는 게 맞는 것 아닌가요? 감사합니다. P.S 설명을 엄청 잘해주셔서 계속 잘 보고 있습니다. 혹시 Part 5랑 6은 언제 나오는건지..?
MinWoo Kim
2022-08-26T11:40:11.765Z
댓글 1
좋아요 1
조회수 262
미해결
프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
안녕하세요 선생님! 압축된 강의 자료를 다운받았는데 압축이 안풀려서요..ㅎㅎ 혹시 된다면 이메일로 강의 자료를 보내주실 수 있으신가요? 이메일은 hjw6207@naver.com 입니다!
hjw6207
2022-08-26T11:33:14.596Z
댓글 1
좋아요 0
조회수 222
미해결
타입스크립트 입문 - 기초부터 실전까지
안녕하세요, 함수 호출할 때 타입 지정할 수 있도록 바꾸었는데 toString이 없다는 오류가 나는데 어떻게 해야할까요? 커뮤니티에있는 다른글들 보면 다른분들도 똑같이 한거같은데.. 어찌해야할지 모르겠네요 ㅜ ㅜ
OoOoOO
2022-08-26T11:30:02.676Z
댓글 1
좋아요 3
조회수 515
미해결
FreeRTOS 프로그래밍
[죄송하지만, 포팅 부탁드립니다.] ------------------------------------------------- - 사용하고 싶은 ST 보드명: stm32746g-discovery - 사용하시는 컴파일러(stm32cubeide) 버젼 1.10.1 -------------------------------------------------
꽃밭위의 제임스
2022-08-26T11:28:14.289Z
댓글 1
좋아요 1
조회수 203
미해결
Vue3 완벽 마스터: 기초부터 실전까지 - "기본편"
ref OnMounted 사용시 자동 import하는 설정이 따로있나요?
장해원
2022-08-26T10:49:16.726Z
댓글 4
좋아요 1
조회수 1654
미해결
[리뉴얼] 처음하는 파이썬 백엔드와 웹기술 입문 (파이썬 중급, flask[플라스크] 로 이해하는 백엔드 및 웹기술 기본) [풀스택 Part1-1]
윈도우 QueryString 사용법 : http GET URI param1==1 param==2 입니다
BH J
2022-08-26T10:42:24.447Z
댓글 2
좋아요 0
조회수 383
미해결
카프카 완벽 가이드 - 코어편
네트워크 설정 영상이 빠진 것 같습니다. 확인 부탁 드려요.
2022-08-26T10:17:39.888Z
댓글 1
좋아요 0
조회수 296
미해결
[Python 실전] 웹크롤링과 데이터분석 : 전세계 축구 선수 몸값 분석
astype으로 데이터 변경이 안된다고 에러가뜨네요 구글링으로 pd.to _numeric() , numpy 를 import 해서 라이브러리로 처리 하려고 해도 변경이 안되요 ㅠㅠ
python 웹-크롤링 pandas beautifulsoup
wndgks49
2022-08-26T09:45:45.801Z
댓글 0
좋아요 0
조회수 233
미해결
따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
리액트, 리엑트, 라우터 리덕스 버전 등이 어떻게 될까요? 해당 프로젝트에서 사용되는 라이브러리들의 버전을 확인하고 싶습니다 부가적으로 해당 프로젝트를 클론해서 직접 보면서 하고 싶은데 어디서 확인해볼 수 있을까요?
강동우
2022-08-26T09:43:36.064Z
댓글 0
좋아요 0
조회수 209
미해결
자바 ORM 표준 JPA 프로그래밍 - 기본편
좋은 강의 항상 감사합니다. Cascade.ALL 혹은 PERSIST를 통해 OneToMany로 연관된 List를 조회하는 것과, SaveALL을 사용하는 것이 성능상 차이가 없는지 궁금합니다. 직접 테스트를 돌려본 결과 반복문 + Save 가 가장 느렸고, Cascade.ALL, 이후 SaveAll 순이었으나, 거의 차이가 발생하지 않아 질문드립니다. 제 생각으로는 CasecadeAll의 경우 루트 엔티티가 save될 때, 루트 엔티티와 동일한 Transaction을 사용하여, saveAll과 비슷한 형태로 작동할 것이라 생각하나, 확실치 않아 질문드립니다.
신동훈
2022-08-26T09:40:09.659Z
댓글 1
좋아요 1
조회수 415