Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yhangf/pythoncrawler
:heartpulse:用python编写的爬虫项目集合
https://github.com/yhangf/pythoncrawler
python3 scripts spiders
Last synced: about 13 hours ago
JSON representation
:heartpulse:用python编写的爬虫项目集合
- Host: GitHub
- URL: https://github.com/yhangf/pythoncrawler
- Owner: yhangf
- License: mit
- Created: 2016-07-13T04:29:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T11:02:48.000Z (almost 2 years ago)
- Last Synced: 2024-12-21T19:04:12.365Z (about 13 hours ago)
- Topics: python3, scripts, spiders
- Language: Python
- Homepage:
- Size: 127 KB
- Stars: 1,520
- Watchers: 65
- Forks: 487
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```shell
(
)\ ) ) ) ( (
(()/( ( ( /( ( /( )\ ( ) ( ( )\ ( (
/(_)))\ ) )\()))\()) ( ( (((_) )( ( /( )\))( ((_) ))\ )(
(_)) (()/( (_))/((_)\ )\ )\ ) )\___ (()\ )(_))((_)()\ _ /((_)(()\
| _ \ )(_))| |_ | |(_) ((_) _(_/(((/ __| ((_)((_)_ _(()((_)| |(_)) ((_)
| _/| || || _|| ' \ / _ \| ' \))| (__ | '_|/ _` |\ V V /| |/ -_) | '_|
|_| \_, | \__||_||_|\___/|_||_| \___||_| \__,_| \_/\_/ |_|\___| |_|
|__/
—————— by yanghangfeng
```
#PythonCrawler: 用 python编写的爬虫项目集合:bug:(本项目代码仅作为爬虫技术学习之用,学习者务必遵循中华人民共和国法律!)
# spiderFile模块简介
1. [baidu_sy_img.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/baidu_sy_img.py): **抓取百度的`高清摄影`图片。**
2. [baidu_wm_img.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/baidu_wm_img.py): **抓取百度图片`唯美意境`模块。**
3. [get_photos.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_photos.py): **抓取百度贴吧某话题下的所有图片。**
4. [get_web_all_img.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_web_all_img.py): **抓取整个网站的图片。**
5. [lagou_position_spider.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/lagou_position_spider.py): **任意输入关键字,一键抓取与关键字相关的职位招聘信息,并保存到本地文件。**
6. [student_img.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/student_img.py): **自动化获取自己学籍证件照。**
7. [JD_spider.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/JD_spider.py): **大批量抓取京东商品id和标签。**
8. [ECUT_pos_html.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/ECUT_pos_html.py): **抓取学校官网所有校园招聘信息,并保存为html格式,图片也会镶嵌在html中。**
9. [ECUT_get_grade.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/ECUT_get_grade.py): **模拟登陆学校官网,抓取成绩并计算平均学分绩。**
10. [github_hot.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/github_hot.py): **抓取github上面热门语言所对应的项目,并把项目简介和项目主页地址保存到本地文件。**
11. [xz_picture_spider.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/xz_picture_spider.py): **应一位知友的请求,抓取某网站上面所有的写真图片。**
12. [one_img.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/one_img.py): **抓取one文艺网站的图片。**
13. [get_baike.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_baike.py): **任意输入一个关键词抓取百度百科的介绍。**
14. [kantuSpider.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/kantuSpider.py): **抓取看图网站上的所有图片。**
15. [fuckCTF.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/fuckCTF.py): **通过selenium模拟登入合天网站,自动修改原始密码。**
16. [one_update.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/one_update.py): **更新抓取one文艺网站的代码,添加一句箴言的抓取。**
17. [get_history_weather.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_history_weather.py): **抓取广州市2019年第一季度的天气数据。**
18. [search_useful_camera_ip_address.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/search_useful_camera_ip_address.py): **摄像头弱密码安全科普。**
19. [get_top_sec_com.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_top_sec_com.py): **异步编程获取A股市场网络安全版块公司市值排名情况,并以图片格式保存下来。**
20. [get_tf_accident_info.py](https://github.com/yhangf/PythonCrawler/blob/master/spiderFile/get_tj_accident_info.py): **同步和异步编程结合获取天津市应急管理局所有事故信息。**
---
# spiderAPI模块简介#### 本模块提供一些网站的API爬虫接口,功能可能不是很全因此可塑性很大智慧的你如果有兴趣可以继续改进。
##### 1.大众点评
```python
from spiderAPI.dianping import *'''
citys = {
'北京': '2', '上海': '1', '广州': '4', '深圳': '7', '成都': '8', '重庆': '9', '杭州': '3', '南京': '5', '沈阳': '18', '苏州': '6', '天津': '10','武汉': '16', '西安': '17', '长沙': '344', '大连': '19', '济南': '22', '宁波': '11', '青岛': '21', '无锡': '13', '厦门': '15', '郑州': '160'
}ranktype = {
'最佳餐厅': 'score', '人气餐厅': 'popscore', '口味最佳': 'score1', '环境最佳': 'score2', '服务最佳': 'score3'
}
'''result=bestRestaurant(cityId=1, rankType='popscore')#获取人气餐厅
shoplist=dpindex(cityId=1, page=1)#商户风云榜
restaurantlist=restaurantList('http://www.dianping.com/search/category/2/10/p2')#获取餐厅
```
##### 2.获取代理IP
爬取[代理IP](http://proxy.ipcn.org)
```python
from spiderAPI.proxyip import get_enableipsenableips=get_enableips()
```
##### 3.百度地图
百度地图提供的API,对查询有一些限制,这里找出了web上查询的接口。
```python
from spiderAPI.baidumap import *citys=citys()#获取城市列表
result=search(keyword="美食", citycode="257", page=1)#获取搜索结果```
##### 4.模拟登录github
```python
from spiderAPI.github import GitHubgithub = GitHub()
github.login() # 这一步会提示你输入用户名和密码
github.show_timeline() # 获取github主页时间线
# 更多的功能有待你们自己去发掘
```##### 5.拉勾网
```python
from spiderAPI.lagou import *lagou_spider(key='数据挖掘', page=1) # 获取关键字为数据挖掘的招聘信息
```