PowerSpider基于requests、lxml、封装成简单的爬虫。将给您避免大量的重复工作
便捷易用的PowerSpider提供以下功能
- 智能化解析编码(二进制、中文、英文更多)
- 解放双手,开箱即用。
PowerSpider 原理可参见释放双手,封装爬虫
- Python 版本不低于3.6
- gcc 正常且完成安装
强烈推荐使用 Conda 或 virtualenv 创建虚拟环境,Python 版本不低于 3.6。
# 推荐使用
sh installScript.sh
# pip 常规安装依赖
pip install -r requirements.txt
# 使用清华源镜像安装
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simplefrom powerspider.Download import downloader
print(downloader("https://www.baidu.com")[:100])
# 2020-11-09 16:08:35.365 | INFO | powerspider.Download:downloader:7 - Scraping https://www.baidu.com
# <!DOCTYPE html>
# <!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charse
# 2020-11-09 16:08:37.744 | INFO | powerspider.Download:downloader:18 - Redirect_URL: https://www.baidu.com/- 模块化解析
- 存储封装
欢迎大家start,issue,fork