Fork me on GitHub
摘要: Requests爬取网页的编码问题 其中 r.encoding 根据响应头中的 charset 判断网站编码,如果没有设置则默认返回 iso 8859 1 编码,而r.apparent_encoding 则通过网页内容来判断其编码。令r.encoding=r.apparent_encoding就不会 阅读全文
posted @ 2019-09-17 17:54 天际层云 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 爬取博客园首页并定时发送到微信 为了能及时掌握技术动向,特意写了这个爬虫,每天定时爬取博客园首页并发送至微信。 环境: Python3.4 第三方库 Requests:向服务器发送请求 BeautifulSoup4:解析Html wxpy:微信接口 Schedule:定时器 代码 注意事项: 不要进 阅读全文
posted @ 2019-09-17 17:53 天际层云 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 判断两个数据库互相不存在的表 select a.TABLE_SCHEMA,a.TABLE_NAME from information_schema.TABLES a where a.TABLE_SCHEMA='db1' and a.TABLE_NAME NOT IN(SELECT b.TABLE_N 阅读全文
posted @ 2019-09-17 17:37 天际层云 阅读(2902) 评论(0) 推荐(0) 编辑