Code Monkey home page Code Monkey logo

ttkun's Introduction

TTKun

目录

  1. 软件架构设计介绍
  2. 使用帮助

1.软件架构设计介绍

1.1 设计简介

* context包简单的模拟了spring的IOC跟DI。
* crawler包实现具体的爬虫功能:通过解析自定义的爬虫规则,执行相应的操作。

1.2 爬虫执行流程介绍

1. 通过读取配置文件的crawler.url,自动获取规则文件。
2. 通过fastjson解析规则文件转成实体类。
3. JsonRuleAction通过解析的json实体,通过委派模式调用相应的action类执行相应的操作。

2.使用帮助

2.1 下载

选择最新版本根据自己电脑的系统环境选择相应的压缩包下:下载地址

2.2 解压

此工具为免安装版,解压后就可以用,不需要安装。

2.3 编写自己的自定义规则

  1. 根据rule.json里定义的规则和自己想爬取数据,编写自己的自定义规则.
  2. 文件命名为网站的uri加上.json
  3. 写好后放到rule文件夹里。
  4. 如果不会写,可以提到issues里。

2.4 修改配置文件

  1. 打开application.properties
  2. 修改application.properties
    2.1 修改crawler.url的值为自己想爬取的网页地址。
    2.2 修改crawler.name的值为自己下载文件文件的名称。
    2.3 修改crawler.save.path的值为自己下载文件保存的地址。
    2.4 crawler.chapter.start为从此章节开始下载,值为标题的内容。
    2.5 crawler.chapter 为只下载此章节的内容,值为标题的内容。
    2.6 crawler.rule.path 为规则文件的地址,默认为当前文件夹下的rule文件夹。
    2.7 download.use.multithreading.enable默认为true,如果为true则开启多线程模式,根据download.manga.thread.pool.size,download.chapter.thread.pool.size里的配置,下载的速度会比单线程高出很多。

3 运行run.bat文件。

ttkun's People

Contributors

natsuki-kining 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.