Giter Site home page Giter Site logo

donghquinn / daangn_scraping Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 80.78 MB

당근마켓 인기 중고 매물 - 서울특별시 전체 매물 데이터 스크레이핑

License: ISC License

TypeScript 98.49% Dockerfile 1.29% Shell 0.22%
data-scrape api nodejs

daangn_scraping's Introduction

당근마켓 인기 물품 데이터 스크레이핑

사용 라이브러리

: cheerio, axios, winston, winston-rotate-daily-file, nodemon, ts-node,

스크레이핑 하는 데이터 종류

게시글 URL, 카테고리, 지역명

동작 구조

60분(한 시간)에 한 번씩 데이터를 가져와 파싱 후 DB에 저장.

  • 당근마켓 서울 지역 인기 매물 페이지의 모든 목록의 카테고리와 url 링크를 스크레이핑 한다.
  • url 링크를 이용해 해당 게시물 내부에서 지역 정보를 긁어온다.
  • 이렇게 가져온 데이터를 데이터베이스에 인서트한다.

V1은 전체 데이터에 대한 API

V2는 각각 점수들에 대한 통계를 낸 API. 가장 많은 지역과 카테고리에 대해 각각의 API를 열어둔다.

  • 카테고리: /v2/score/category
  • 지역: /v2/score/region

환경변수 설명

  • DB_HOST= DB 서버 주소

  • DB_PORT= DB 서버 포트

  • DB_NAME= 데이터베이스 이름

  • DB_PASS= DB 유저 비밀번호

  • DB_USER: DB 유저 이름

  • TABLE: 스크레이핑 한 데이터 저장 테이블 이름

  • NODE_ENV: 구동 환경 ( development | production)

  • APP_PORT: 구동 포트

  • TIME_SET: 데이터를 스크레이핑 할 주기 선택

빌드

yarn run build

구동 명령

yarn run start

도커를 이용한 구동

docker-compose up -d

daangn_scraping's People

Contributors

donghquinn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.