GithubHelp home page GithubHelp logo

comments_collector's Introduction

Comment Collector

requirements

Introduce

  • 네이버 기사 댓글 수집기입니다.

  • 연예, 정치, 경제, 사회 중 한가지 카테고리를 선택하여 랭크 순위권 기사의 댓글을 수집합니다.

  • 30위까지의 수집이 끝나면 하루 전의 랭크로 이동하여 반복 작업합니다.

  • collector.py : 실제 수집기

  • value.py : URL string 모음

How to run

  1. requirements의 Chrome driver 혹은 PhantomJS를 운영체제에 맞는 버전으로 다운로드

  2. requirements.txt 로 python package install

    pip install -r requirements.txt

  3. collector.py 에서 MAX_LOOP_SHOW_MORE_BTN, MAX_RANK 수치 조정

    • MAX_LOOP_SHOW_MORE_BTN : 댓글 더보기 버튼, 한 기사당 수집하는 댓글 갯수
    • MAX_RANK : 1위부터 30위 까지 존재하는 랭크에서 몇 순위의 기사까지 수집할 지 정하는 수
    • SLEEP_TIME : 각 버튼 클릭 후 리소스 로드까지 대기할 시간, 리소스 전부 로딩까지 대기하는 기능이 없기 때문에 추가
  4. collector.py를 실행

    • ent, pol, eco, soc : 카테고리, 각각 연예, 정치, 경제, 사회
    • period : 수집 시작 날짜 ~ 수집 끝나는 날짜 (Format : Y-m-d)
  5. collected 폴더에 category_%Y%m%d.txt 로 파일 생성

comments_collector's People

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.