GithubHelp home page GithubHelp logo

guqii / scrapytest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cuanboy/scrapytest

0.0 0.0 0.0 56 KB

SCRAPY爬虫实验,主要是一些简单的栗子,让你快速了解scrapy玩法!

Home Page: http://www.scrapyd.cn

Python 100.00%

scrapytest's Introduction

SCRAPY爬虫实验

mingyan2

mingyan2主要爬取 http://lab.scrapyd.cn 里面的两个页面并保存为html格式,其实就是一个下载的过程,目的很单纯,主要是让诸位理解scrapy是怎样爬起来的,里面需要神马内脏,大家可以下了运行试试!

simpleStartUrl

scrapy初始url的两种写法

itemSpider

此项目爬取 http://lab.scrapyd.cn 里面的一条名言里的:名言内容、作者、标签,注意只是一条数据,然后保存为txt文档,这个练习,主要是学习scrapy css选择器的基本用法,然后结合scrapy shell 进行相应调试

listSpider

此项目爬取 http://lab.scrapyd.cn 首页的所有名言,也就是列表爬取,主要学习如何使用:

for …… in ……

这个循环方式进行递归爬取,快试试吧!

nextSpider

如果只能用scrpay爬取一页数据,其实和Ctrl+c、Ctrl+v没神马区别,真正拉开差距的是让scrapy自动的爬取多页,本项目寥寥几行代码,就能爬完整个网站,或许到这里你才能对它产生相见恨晚的赶脚!

argSpider

此实例给大伙展示了Scrapy的灵活之处,我们可以在爬取的时候给蜘蛛喂不同的料,然后爬取不同的数据,比如不同的时间段、不同的标签、不同的域名……这些都是通过Scrapy的arguments实现,详情移步:scrapy参数灵活应用

scrapytest's People

Contributors

cuanboy 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.