Git Product home page Git Product logo

animespider's Introduction

动漫下载链接爬虫


本代码只作学习交流,仅供个人研究之用,请支持正版版权

开发环境

Ubuntu 14.04.4 LTS
Python 3.4.3 64-bit
MySQL 14.14

需要的库

scrapy
Python开发的一个快速,高层次的屏幕抓取和web抓取框架,用于抓取web站点并从页面中提取结构化的数据。

pyMySql
Python连接数据库并进行处理的模块。

使用说明

进入根目录,执行
$ scrapy crawl Anime
即可开始抓取,抓取完毕后,执行
$ python QueryAnime.py
输入需要查询的内容,会在当前目录下生成result.txt文件存放查询结果

文件说明

/QueryAnime.py
连接数据库查询,并将查询结果写入文件。

/CreateTable.sql
创建数据库,并创建两个表。其中name表存储动漫标题, info表存储动漫的集数和连接。

/Anime/items.py
说明需要抓取的数据项。

/Anime/pipelines.py
抓取数据后的处理动作,在这里实现将数据写入数据库。

/Anime/settings.py
爬虫设置文件,在这里可以设置爬虫速度。

/Anime/spiders/AnimeSpider.py
爬虫文件,在这里写入爬虫规则。

待改进的部分

  • 界面采用GUI
  • 动漫查询支持模糊搜索
  • 抓取与查询的整合

许可

本代码采用GPL协议,具体请参照GPL协议内容。

animespider's People

Contributors

treezzz avatar

Watchers

 avatar  avatar

Forkers

tianyudizhua

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.