GithubHelp home page GithubHelp logo

homework_crawler's Introduction

homework_crawler

程序执行需要安装node作为执行环境。

第一步:

  npm install
  webpack
  mv ./dist/crawler.js ./example_data
  cd ./example_data

然后将dist/crawler.js放到example_data文件夹下面。因为当前程序的运行,需要依赖以下配置文件:

  1. urls.txt 记录了需要爬取的网页url列表
  2. parse_rule.json html文件解析规则配置表
  3. filter_rule.json 数据过滤规则配置表

第二步:

  node crawler -f

程序将读取urls.txt并将下载到的html文件保存至当前执行目录下的/html_pages目录

第三步:

  node crawler -e

程序将解析/html_pages目录下所有的html文件,将获取到的结构化数据保存于/extract_data目录。

homework_crawler's People

Contributors

mr-haili 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.