All Projects → cw1997 → Tieba-Birthday-Spider

cw1997 / Tieba-Birthday-Spider

Licence: Apache-2.0 license
百度贴吧生日爬虫,可抓取贴吧内吧友生日,并且在对应日期自动发送祝福

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tieba-Birthday-Spider

Bilibili member crawler
B站用户爬虫 好耶~是爬虫
Stars: ✭ 115 (+310.71%)
Mutual labels:  spider, queue, requests
Reptile
🏀 Python3 网络爬虫实战(部分含详细教程)猫眼 腾讯视频 豆瓣 研招网 微博 笔趣阁小说 百度热点 B站 CSDN 网易云阅读 阿里文学 百度股票 今日头条 微信公众号 网易云音乐 拉勾 有道 unsplash 实习僧 汽车之家 英雄联盟盒子 大众点评 链家 LPL赛程 台风 梦幻西游、阴阳师藏宝阁 天气 牛客网 百度文库 睡前故事 知乎 Wish
Stars: ✭ 1,048 (+3642.86%)
Mutual labels:  spider, requests
Bilili
🍻 bilibili video (including bangumi) and danmaku downloader | B站视频(含番剧)、弹幕下载器
Stars: ✭ 379 (+1253.57%)
Mutual labels:  spider, requests
Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+6546.43%)
Mutual labels:  spider, requests
weibo topic
微博话题关键词,个人微博采集, 微博博文一键删除 selenium获取cookie,requests处理
Stars: ✭ 28 (+0%)
Mutual labels:  spider, requests
python-fxxk-spider
收集各种免费的 Python 爬虫项目
Stars: ✭ 184 (+557.14%)
Mutual labels:  spider, requests
Hive
lots of spider (很多爬虫)
Stars: ✭ 110 (+292.86%)
Mutual labels:  spider, beautifulsoup
Requests Html
Pythonic HTML Parsing for Humans™
Stars: ✭ 12,268 (+43714.29%)
Mutual labels:  requests, beautifulsoup
Fooproxy
稳健高效的评分制-针对性- IP代理池 + API服务,可以自己插入采集器进行代理IP的爬取,针对你的爬虫的一个或多个目标网站分别生成有效的IP代理数据库,支持MongoDB 4.0 使用 Python3.7(Scored IP proxy pool ,customise proxy data crawler can be added anytime)
Stars: ✭ 195 (+596.43%)
Mutual labels:  spider, threading
PTT Beauty Spider
PTT 表特版爬蟲圖片下載器
Stars: ✭ 47 (+67.86%)
Mutual labels:  spider, beautifulsoup
Jssoup
JavaScript + BeautifulSoup = JSSoup
Stars: ✭ 203 (+625%)
Mutual labels:  spider, beautifulsoup
get LibSeat
利昂图书馆预约系统自动预约&签到程序。支持包括中国人民大学、北京师范大学、济南大学、哈尔滨工业大学等在内的38所高校的图书馆系统
Stars: ✭ 39 (+39.29%)
Mutual labels:  spider, requests
psched
Priority-based Task Scheduling for Modern C++
Stars: ✭ 59 (+110.71%)
Mutual labels:  queue, threading
Webspider
在线地址: http://119.23.223.90:8000
Stars: ✭ 340 (+1114.29%)
Mutual labels:  spider, requests
think-async
🌿 Exploring cooperative concurrency primitives in Python
Stars: ✭ 178 (+535.71%)
Mutual labels:  queue, threading
SD-streams
Anime streaming without ads using Beautifulsoup and requests Python
Stars: ✭ 18 (-35.71%)
Mutual labels:  requests, beautifulsoup
Languagepod101 Scraper
Python scraper for Language Pods such as Japanesepod101.com 👹 🗾 🍣 Compatible with Japanese, Chinese, French, German, Italian, Korean, Portuguese, Russian, Spanish and many more! ✨
Stars: ✭ 104 (+271.43%)
Mutual labels:  requests, beautifulsoup
Gsoc Organisation Scraper
Scrape GSoC organisations using a single script.
Stars: ✭ 121 (+332.14%)
Mutual labels:  requests, beautifulsoup
Scrapingoutsourcing
ScrapingOutsourcing专注分享爬虫代码 尽量每周更新一个
Stars: ✭ 164 (+485.71%)
Mutual labels:  spider, requests
iHealth crawler
iHealth 项目的内容爬虫(一个基于 python 和 MongoDB 的医疗咨询爬虫)
Stars: ✭ 24 (-14.29%)
Mutual labels:  pymongo, requests

Tieba-Birthday-Spider

百度贴吧生日爬虫,可抓取贴吧内吧友生日,并且在对应日期自动发送祝福

更新日志

  • Version 0.1.0 (2017-06-13 16:00:30) 首次提交代码

执行环境

Python 2.7 64bit + MongoDB (请确保环境为64位,防止爬虫中的queue容量过大导致在32位环境下内存不足的异常发生)

项目依赖包

  • pymongo
  • BeautifulSoup
  • requests

使用方法

  1. 使用pip或者其他方式正确安装好上述项目依赖包
  2. 启动MongoDB
  3. 配置config.py中各项参数
  4. 启动spider.py进行生日等数据抓取
  5. 运行post.py测试是否能正常发送生日祝福贴
  6. 配置cron规则,让post.py能够每天定时运行,并且保证MongoDB服务一直保持开启状态

文件说明

文件名称 文件说明 备注
config.py 配置信息 内部附有注释,请正确配置。 如果有任何问题或者认为注释有描述不清需要改进的地方欢迎提issue与我讨论。为了防止频繁发帖导致您的百度帐号被误判为SPAM而封号,请尽可能注册几个小号,并且升级到合适的等级以防出现验证码。后期我们会考虑增加接入打码平台。
spider.py 爬虫主文件 在config.py中正确配置好相关参数后,先启动MongoDB服务,然后可直接执行该文件 ,抓取的信息将直接存储在MongoDB中。
post.py 定时发帖主文件 执行该文件将会自动按照配置文件中设置好的参数,将会将指定贴吧内所有过生日的吧友信息提取出来,并且向指定帖子中发送生日祝福。如果需要定时发送,请将该文件加入cron规则,crontab规则:0 0 0 * *表示在每日0点0分0秒自动执行该脚本。并且保证MongoDB服务一直保持开启状态。 如果需要自定义祝福帖内容模版,请参照main函数中的buildContent函数调用点以及相关注释自行修改post.py下的buildContent函数。
TiebaSpider.py 部分贴吧信息抓取方法 默认使用内置的html_parser作为BeautifulSouphtml_parser,用户可以自行修改TiebaSpider类的属性成员html_parser来使用其他html_parser,比如说html5lib。该类使用requests模块进行http通信。
TiebaUtil.py 部分贴吧发帖回帖以及登录检测模块 该类使用urllib2模块进行http通信。
SpiderUtil.py 爬虫助手函数 用于整理抓取到的信息,或者获取一些特殊元数据。

程序特点

  • 使用threading多线程库+Queue队列,性能高效
  • MongoDB持久化存储爬虫内容,适合抓取内容结构随时可变的场景

成功案例

交流QQ群

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].