爬虫robots.txt
时间: 2023-08-27 17:06:18 浏览: 111
Robots_txt-Specifications.pdf
回答: 爬虫robots.txt是一个很小的文本文件,位于网站的根目录,用来告诉爬虫工具是否要抓取网站的某些部分。它通常是一个叫作robots.txt的文本文件,一般放在网站的根目录下,它的作用是告诉爬虫和搜索引擎哪些页面可以抓取,哪些不可以抓取。在编写robots.txt文件时,需要注意的几点是,文件需要遵循UTF-8编码,以及可以使用一些指令来标明禁止爬虫访问的链接,如Disallow指令。例如,可以使用以下指令来禁止Baiduspider爬虫访问/myself、/month和/disallow链接:User-Agent: Baiduspider Disallow: /myself Disallow: /month Disallow: /disallow。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [robots.txt不是很详细的详解](https://blog.csdn.net/luomaCLX/article/details/122532670)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [爬虫:Robots协议](https://blog.csdn.net/Smart_look/article/details/121599170)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [网站中的 robots.txt 在爬虫中的指导作用](https://blog.csdn.net/Together_CZ/article/details/86629056)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文