Python Crawler-robots Protocol

Source: Internet
Author: User

2017-07-25 21:08:16

First, the scale of the web crawler

Restriction of web crawler

? SOURCE review: Judge User‐agent to limit
Check the user‐agent domain of the incoming HTTP protocol header, only in response to browser or friendly crawler access
? Post announcement: Robots Agreement
Inform all crawler sites of crawl strategies, requiring crawlers to comply with

Iii. Robots Agreement

Role: Web site tells the Web crawler which pages can be crawled, which do not
Form: Robots.txt file in the root directory of the Web site

If the site does not provide the robots agreement, it means that the site allows any crawler to crawl any number of times.

Class human behavior can in principle not comply with the robots agreement

https://www.baidu.com/robots.txthttp://news.sina.com.cn/robots.txt

Example:

https://www.jd.com/robots.txtuser‐agent: *Disallow: /?*Disallow: /pop/*. Htmldisallow: /pinpai/*.html?*user‐agent:etaospiderdisallow :/User‐agent:huihuispiderdisallow: /User‐agent:gwdangspiderdisallow: /User‐agent:wochachaspiderdisallow: /#  Comment, * Represents all,/represents the root directory user‐agent: *Disallow: /

Python Crawler-robots Protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.