整理下苏生不惑开发过的那些软件和脚本
苏生不惑第
361
篇原创文章,将本公众号设为星标
,第一时间看最新文章。
苏生不惑这个号已经写了360篇原创文章,分享过很多软件脚本,其中有些是我写的,这里整理下:
部分软件的下载地址我都更新到知识星球了,在星球内点击公众号标签查看,微信扫码加入吧。
公众号文章下载
输入文章链接可以批量下载音频和视频 因为读者的一个问题,我写了个公众号批量下载工具 ,效果如图,顺便把文章内容也下载了:
话题也支持我又开发了个公众号音频视频和话题批量下载工具 ,以我的公众号话题为例:
视频去Logo油猴脚本
写油猴脚本其实很简单,之前文章也分享过 5 分钟带你写个自己的 Chrome 扩展和油猴脚本 ,直接新建脚本写代码。
// ==UserScript==
// @name 视频去Logo
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 视频去Logo
// @author 苏生不惑
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(function (){
document.querySelectorAll(".iqp-logo-top").forEach(function(item,index,arr){item.style.display='none';});//爱奇艺
document.querySelectorAll(".txp_waterMark_pic").forEach(function(item,index,arr){item.style.display='none';});//腾讯
document.querySelectorAll(".logo-new").forEach(function(item,index,arr){item.style.display='none';});//优酷
}, 3000);
document.querySelectorAll("a").forEach(function(item,index,arr){item.target='_blank';});
})();
安装脚本前:
微信运动修改
在小米运动app绑定微信后,打开软件输入要修改的微信运动步数,小米运动账号和密码,就是这么简单2022 年 一键修改微信运动步数
如果想要每天自动刷,可以发送你的账号到后台用我的腾讯云函数刷网易云音乐每天自动听歌300首升级LV10,b站每天自动签到升级LV6,京东每天自动签到领京豆,微信运动每天自动修改步数
知乎下载
输入知乎专栏id即可批量导出知乎专栏文章为pdf 周末又写了个知乎专栏批量下载工具,顺便通知个事 ,比如 https://www.zhihu.com/column/c_1492085411900530689 这个的c_1492085411900530689 ,导出效果:
回答内容也可以批量下载到excel,包括回答人昵称和回答内容:
def export_pdf():
import pdfkit,os
print('导出 PDF...')
htmls = []
for root, dirs, files in os.walk('.'):
for name in files:
if name.endswith(".html"):
print(name)
try:
pdfkit.from_file(name, 'pdf/'+name.replace('.html', '')+'.pdf')
except Exception as e:
print(e)
export_pdf()
微博下载
下载我打包的工具,输入微博uid 一键批量下微博内容/图片/视频,获取博主最受欢迎微博,图片查找微博博主 ,是否下载图片和视频,1为是,0为否,如果想全部下载时间就输入2010-01-01。
cookie需要登陆网页版微博 https://m.weibo.cn/ 在控制台获取。
抓取数据
不用写代码,用chrome扩展web scraper也可以抓取抓取数据 不用写代码,Chrome 扩展神器 web scraper 抓取知乎热榜/话题/回答/专栏,豆瓣电影 ,不会 Python 没关系,手把手教你用 web scraper 抓取豆瓣电影 top 250 和 b 站排行榜 ,为了方便大家学习抓取,我导出了sitemap,你可以直接导入使用,比如微博转发的抓取:
{"_id":"weibo","startUrl":["https://weibo.com/1767819164/Lr7nQkAHl?type=repost"],"selectors":[{"id":"content","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.list_li","multiple":true,"delay":2000,"clickElementSelector":"a.page[action-data]","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"微博昵称","type":"SelectorText","parentSelectors":["content"],"selector":".WB_text a[usercard]","multiple":false,"regex":"","delay":0},{"id":"微博评论","type":"SelectorText","parentSelectors":["content"],"selector":".WB_text span","multiple":false,"regex":"","delay":0},{"id":"评论时间","type":"SelectorText","parentSelectors":["content"],"selector":".WB_from a","multiple":false,"regex":"","delay":0}]}
抓取豆瓣电影top250:
{"_id":"douban","startUrl":["https://movie.douban.com/top250?start=[0-250:25]&filter="],"selectors":[{"id":"row","type":"SelectorElement","parentSelectors":["_root"],"selector":".grid_view li","multiple":true,"delay":0},{"id":"电影名","type":"SelectorText","parentSelectors":["row"],"selector":"span.title","multiple":false,"regex":"","delay":0},{"id":"豆瓣链接","type":"SelectorLink","parentSelectors":["row"],"selector":".hd a","multiple":false,"delay":0},{"id":"电影排名","type":"SelectorText","parentSelectors":["row"],"selector":"em","multiple":false,"regex":"","delay":0},{"id":"电影简介","type":"SelectorText","parentSelectors":["row"],"selector":"span.inq","multiple":false,"regex":"","delay":0},{"id":"豆瓣评分","type":"SelectorText","parentSelectors":["row"],"selector":"span.rating_num","multiple":false,"regex":"","delay":0}]}
抓取b站排行榜的视频排名,标题,播放量,弹幕数,up主,点赞数,投币数,收藏数等 https://www.bilibili.com/v/popular/rank/all 分享几个让 b 站开挂的油猴脚本和chrome扩展
导出的excel数据:
{"_id":"bilibili","startUrl":["https://www.bilibili.com/v/popular/rank/all"],"selectors":[{"delay":0,"id":"row","multiple":true,"parentSelectors":["_root"],"selector":"li.rank-item","type":"SelectorElement"},{"delay":0,"id":"视频排名","multiple":false,"parentSelectors":["row"],"regex":"","selector":"i.num","type":"SelectorText"},{"delay":0,"id":"视频标题","multiple":false,"parentSelectors":["row"],"regex":"","selector":"a.title","type":"SelectorText"},{"delay":0,"id":"播放量","multiple":false,"parentSelectors":["row"],"regex":"","selector":".detail-state > span:nth-of-type(1)","type":"SelectorText"},{"delay":0,"id":"弹幕数","multiple":false,"parentSelectors":["row"],"regex":"","selector":"span:nth-of-type(2)","type":"SelectorText"},{"delay":0,"id":"up主","multiple":false,"parentSelectors":["row"],"regex":"","selector":"a span","type":"SelectorText"},{"delay":0,"id":"视频链接","multiple":false,"parentSelectors":["row"],"selector":"a.title","type":"SelectorLink"},{"delay":0,"id":"点赞数","multiple":false,"parentSelectors":["视频链接"],"regex":"","selector":"span.like","type":"SelectorText"},{"delay":0,"id":"投币数","multiple":false,"parentSelectors":["视频链接"],"regex":"","selector":"span.coin","type":"SelectorText"},{"delay":0,"id":"收藏数","multiple":false,"parentSelectors":["视频链接"],"regex":"","selector":"span.collect","type":"SelectorText"}]}
微信头像下载
由于微信接口调整,下载微信头像不能用了,很是遗憾:
电脑登陆多个微信
写个简单的bat脚本即可在电脑上登陆多个微信,想开几个微信都行如何在电脑上登陆多个微信
start "D:\wechat\WeChat.exe"
start "D:\wechat\WeChat.exe"
start "D:\wechat\WeChat.exe"
如果文章对你有帮助还请
点赞/在看/分享
三连支持下, 感谢各位!