YES24 베스트셀러 후기 키워드 TOP 10 - Selenum을 활용한 베스트셀러 후기 키워드 추출 - chromedriver 설치 필요 - 더 빠른 실행 시간을 원할 경우 beautifulsoup와 같은 라이브러리 사용 필요 코드 요약 YES24 카테고리 > 베스트 셀러 접속 베스트 셀러 상세 보기를 새탭으로 열기(20권만) 베스트 셀러의 리뷰를 최대 5개씩 저장 저장한 리뷰 목록에서 명사만 추출 키워드 TOP 10 막대 차트 생성 import selenium from selenium import webdriver from selenium.webdriver.common.by import By from time import sleep import time from konlpy.tag import Okt..
에러 현상 - request.getRemoteAddr() 했을 때 IP가 아닌 0:0:0:0:0:0:0:1가 나오는 상황 해결 1. eclicpse 상위 메뉴에서 Run > Run Configrations...를 클릭한다. 2. Tomcat을 검색한 후 -Djava.net.preferIPv4Stack=true를 추가하고 Apply를 클릭한다. 3. 0:0:0:0:0:0:0:1이 아닌 127.0.0.1이 출력된다. 그러나 IPv4 주소 출력이 필요하다. 다른 방법을 찾았다.
Tree 형태의 Object를 하나의 Array로 변환하는 함수이다. /* 변환 전 parent : { a : a, children : [{b : b}, {c : c}] } 변환 후 [{a, a}, {b : b}, {c : c}] */ function convertObjectToArray(tree) { const list = []; function pushItem(node) { if (!node) return; node.forEach(item => { list.push(item); const childrenKeyList = Object.keys(item).filter(key => Array.isArray(item[key])); if (childrenKeyList.length > 0) { childrenK..
자바스크립트(Javascript)는 스크립트 언어이자 프로토타입 기반의 프로그래밍 언어이다. HTML은 웹 페이지의 기본 구조를 담당하고, CSS는 디자인을 담당하며, 자바스크립트는 웹 페이지의 동작을 담당한다. 자바스크립트란 프로토타입 기반 객체지향 언어이다.자바와 혼동되는 경우가 많으나 자바는 클래스 기반 객체지향 언어이다.JavaScript와 JAVA의 공통점: 객체지향class Dog { constructor(name) { this.name = name; } bark() { console.log(`${this.name} is barking!`); }}const myDog = new Dog("Buddy");myDog.bark(); //Buddy is b..