Giter Club home page Giter Club logo

simple_crawler's Introduction

simple-crawler

简单爬虫(爬取静态网页,没有使用框架,权当对爬虫工作机制的一个了解)

目标分析

确定目标,然后对目标进行分析(选择策略),包含三个分析方向。

在页面中通过右键审查元素的方式来获取一下三个元素的信息

  • URL格式:限定抓取网页的范围
  • 数据格式:根据需要抓取的信息,选择抓取的标签
  • 网页编码:在代码解析器中指明编码格式

目标

百度百科Python词条相关词条的网页 -标题和简介

入口页:http://baike.baidu.com/item/Python

URL格式:

词条页面URL:/view/20965.htm

none

非完整URL,在代码中我们还需要进行拼接

数据格式:

标题:

none

简介:

none

页面编码:

找到网页的head(审查网页任意位置),找到网页的编码UTF-8

none

simple_crawler's People

Contributors

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