基于Golang的chromedp库实现获取Hostloc的每日热帖

背景 关于获取Hostloc的每日热帖推送的话题,本站已经写了两篇博客阐述了,分别是你想收到hostloc每日热帖的邮件么?以及如何越过Hos...

2022-06-30 · 2 分钟 · sharp097

如何越过Hostloc的防CC攻击机制获取其每日热帖

背景 很早之前写过一篇叫 你想收到hostloc每日热帖的邮件么?的博客,但是没过多久这个就失效了,因为hostloc站点加了防CC攻击的机制,...

2022-06-30 · 3 分钟 · sharp097

分享一个监控知12的wordpress插件是否更新的脚本

</a /> 背景 本站现在用了知12提供的wordpress付费阅读插件,但是他们没有把插件发布到wordpress的插件商店,从而也就无法得知新版本...

2020-09-06 · 2 分钟 · sharp097

你想收到hostloc每日热帖的邮件么?

碎碎念 掐指一算,混loc的日子应该也快一年了,刚开始还几乎每天都上论坛上翻翻帖子,可后来到现在越来越少上了,但也还会隔一段时间猛刷上个把小时...

2020-03-26 · 1 分钟 · sharp097

你想第一时间得知垠神是否发表了新博客么?

背景 今天给大家分享一个python爬虫 ,其实很早之前就在这写过一个类似的,只不过这个是用于部署在vps上用的,因为这个爬虫每次运行的时候都要...

2020-03-26 · 3 分钟 · sharp097

为什么用BeautifulSoup提取xml的link标签中的url总为空呢

废话少说 闲言少叙,直接上代码: #!/usr/bin/env python3 # coding=utf-8 import requests from bs4 import BeautifulSoup def get_soup(): url = 'https://www.solidot.org/index.rss' rss_xml = requests.get(url).text soup = BeautifulSoup(rss_xml, 'html5lib') return soup def get_mail_body(): contents = get_soup().select('item')[0:9] contents_list = [] for c in contents: title = c.select_one('title').get_text() link = c.select_one('link').get_text() contents_list.append(title + ' ' + link) return '\n'.join(contents_list) print(get_mail_body())   假如上...

2020-03-14 · 3 分钟 · sharp097

分别用requests和selenium实现了拉勾的爬虫

背景 因为下周一要去腾讯面试写代码,面试官说会考爬虫和数据处理,我就寻思着写个爬虫练练手,因为 最近几天一直都在拉勾上找工作就用拉勾拿来练手了。...

2019-09-22 · 2 分钟 · sharp097

记录scrapy的一个小坑之爬虫启动后马上就自动退出

环境 Mac 10.13.6 Python 3.6.4 Scrapy 1.5.0 现象 爬虫运行几秒钟就自动停止并报如下错误信息: 原因 这其中的原因是在后来再次啃官方文档到 这里时发现的。 原因其实很简单,但我印象...

2018-12-21 · 1 分钟 · sharp097