01robots协议.py
"""
在网站域名后加上/robots.txt就能查看当前页面的爬虫协议
协议并非强制 但是非常建议遵守
User-agent:针对哪个爬虫
Disallow:禁止爬取的页面
Allow:允许爬取的页面
Sitemap:页面地图 方便爬取
Crawl-delay:最短爬取时间间隔
"""
#使用之前记得在终端安装第三方库requests
#pip install requests
#import requests
"""
在网站域名后加上/robots.txt就能查看当前页面的爬虫协议
协议并非强制 但是非常建议遵守
User-agent:针对哪个爬虫
Disallow:禁止爬取的页面
Allow:允许爬取的页面
Sitemap:页面地图 方便爬取
Crawl-delay:最短爬取时间间隔
"""
#使用之前记得在终端安装第三方库requests
#pip install requests
#import requests