issues
search
zengbin93
/
blog
17
stars
10
forks
source link
实践 - 爬虫
#22
Open
zengbin93
opened
6 years ago
zengbin93
commented
6 years ago
对于搞数据的人来说,爬虫真的是基本功。
Python非常适合用来写爬虫!
当然,其他的语言几乎都可以写爬虫。
zengbin93
commented
6 years ago
爬虫基础
robots.txt -- 绅士协议
robots.txt(统一小写)是一种存放于网站根目录下的ASCII编码的文本文件。它通常告诉爬虫程序,此网站中的哪些内容是可以获取的,哪些是不可以获取的。
默认放在网站根目录,比如,简书:
https://www.jianshu.com/robots.txt
scrapy自动遵守robots协议
zengbin93
commented
6 years ago
Python中的爬虫相关库
requests
requests-html
github:
https://github.com/kennethreitz/requests-html
urllib
bs4.BeautifulSoup
scrapy
pyspider
selenium
zengbin93
commented
6 years ago
Requests
中文文档:
http://cn.python-requests.org/zh_CN/latest/
对于搞数据的人来说,爬虫真的是基本功。Python非常适合用来写爬虫! 当然,其他的语言几乎都可以写爬虫。