互联网不是法外之地,做任何事情之前都请三思而行

    通常在网站根目录下的 robots.txt 中约定了可以爬取的内容,以BiliBili为例:
    https://www.bilibili.com/robots.txt

    1. User-agent: Yisouspider
    2. Allow: /
    3. User-agent: Applebot
    4. Allow: /
    5. User-agent: bingbot
    6. Allow: /
    7. User-agent: Sogou inst spider
    8. Allow: /
    9. User-agent: Sogou web spider
    10. Allow: /
    11. User-agent: 360Spider
    12. Allow: /
    13. User-agent: Googlebot
    14. Allow: /
    15. User-agent: Baiduspider
    16. Allow: /
    17. User-agent: Bytespider
    18. Allow: /
    19. User-agent: PetalBot
    20. Allow: /
    21. User-agent: *
    22. Disallow: /