首页
站点统计
壁纸
关于
Search
1
中兴光猫F7005 /7015TV3提示ITMS认证失败解决办法
876 阅读
2
中兴光猫SN修改工具
280 阅读
3
电脑开启Telnet教程
240 阅读
4
开机自动删除火绒证书
163 阅读
5
ShareX 全功能截图 v16.1.0 便携版
143 阅读
首页
软件工具
实践教程
光猫教程
登录
/
注册
Search
标签搜索
火绒
LUOCHEN-ACHEN
累计撰写
8
篇文章
累计收到
4
条评论
首页
栏目
首页
软件工具
实践教程
光猫教程
页面
站点统计
壁纸
关于
搜索到
3
篇与
的结果
2024-06-28
开机自动删除火绒证书
前言在浏览关于火绒6.0版本更新的详细说明时,我意外发现,自己已使用颇有一段时间的火绒6.0版本,默认悄无声息地启用了加密流量拦截功能。这一设计初衷是为了更全面地为用户进行安全检查与防护,确保信息传输的安全性。出于对个人隐私管理和网络自主权的考虑,我迅速手动关闭了这项自动开启的功能,心怀感激的同时也保持着审慎,对于火绒这份略显过度的热情保护,我特么先谢谢它。随后,在进一步探究系统证书管理时,不期然发现火绒还有一种颇为“执着”的行为——类似顽皮小狗般自行安装证书。为了更好地掌控我的系统环境,我决定采取主动措施,编写了一个自启动脚本,旨在每次开机时自动清除这些未经明确同意便擅自加入的证书,以此维护系统的纯净与个性化设置的自主性。{dotted startColor="#ff6c6c" endColor="#1989fa"/}删除脚本# 指定要查找的颁发者名称中的字符 $issuerNameToDelete = "huorong" # 定义所有要检查的证书存储区 $stores = @( "Cert:\LocalMachine\Root", "Cert:\LocalMachine\CA", "Cert:\LocalMachine\My", "Cert:\LocalMachine\TrustedPublisher", "Cert:\LocalMachine\TrustedPeople", "Cert:\CurrentUser\Root", "Cert:\CurrentUser\CA", "Cert:\CurrentUser\My", "Cert:\CurrentUser\TrustedPublisher", "Cert:\CurrentUser\TrustedPeople" ) foreach ($storePath in $stores) { Write-Host "Checking store: $storePath" $certs = Get-ChildItem -Path $storePath foreach ($cert in $certs) { if ($cert.Issuer -like "*$issuerNameToDelete*") { Write-Host "Deleting certificate: $($cert.Subject) from store: $storePath" Remove-Item -Path "$storePath\$($cert.Thumbprint)" -Force } } } Write-Host "Completed certificate deletion." {dotted startColor="#ff6c6c" endColor="#1989fa"/}定时任务执行schtasks /create /tn "DeleteHuorongCertificates" /tr "powershell.exe -WindowStyle Hidden -ExecutionPolicy Bypass -File \"%文件目录%\"" /sc onstart /delay 0000:50 /rl highest /f解压即可使用的脚本文件请解压到C盘根目录下,用管理员权限执行create_startup_delay_task.bat文件即可。{cloud title="脚本程序下载 Scripts.zip" type="default" url="https://www.lc0524.cn/usr/uploads/2024/06/49893583.zip" password=""/}
2024年06月28日
163 阅读
1 评论
1 点赞
2024-06-03
抖音探宝:如何用 OCR 自动化寻找最佳短视频,解放双手!
前言对于从事视频编辑工作的朋友而言,定位参考账号和搜集范例视频素材往往是项既费时又挑战重重的任务。常规的关键词搜索虽能初步挖掘出一些目标账号和视频内容,但很快就会遭遇信息重复、新资源难觅的瓶颈,无法满足持续性数据获取的需求。面对这一难题,如何有效且持续地捕获相关账号信息及视频样本呢?以热门短视频平台抖音为例,我们不妨采取一种更为策略性的方法:初期,投入时间对账号进行细致筛选与偏好设定,这一步骤如同“训练”系统理解我们的兴趣范畴。随之而来的是,平台的智能推荐算法将会逐步优化,向我们推送越来越多符合需求的内容。接下来的核心在于模拟真实的视频浏览行为。通过技术手段自动化这一过程,不仅观看视频,同时运用OCR(光学字符识别)技术巧妙抓取视频画面中的关键信息,诸如标题、时长及点赞数等,依据预设的标准进行内容过滤与优选。最后一步,模拟用户点击操作,自动复制视频链接,并将整理好的宝贵资料保存至本地数据库,为后续的创意灵感和素材整理打下坚实基础。本文旨在深入探讨这一系列解决方案,揭开高效搜集视频素材的面纱,为视频剪辑工作者提供一套实用且可持续的策略指南。1、pytesseract借助 pyautogui 和 pytesseract,可以先对屏幕进行截图,然后利用 pytesseract 进行文字识别;首先,下载 pytesseract 客户端,安装后将运行目录配置到环境变量中下载地址: {abtn icon="fa-git" color="#ffbb00" href="https://github.com/UB-Mannheim/tesseract/wiki" radius="5" content="pytesseract 客户端"/} 然后,下载中文语音训练库并放到应用安装目录PS:最新版本为 4.1.0下载地址: {abtn icon="fa-git" color="#ff6800" href="https://github.com/tesseract-ocr/tessdata" radius="5" content="4.1.0"/} 接着,安装依赖pip3 install pyautogui pytesseract核心源码如下: import pyautogui, pytesseract, os, re from zhon.hanzi import punctuation os.environ['TESSDATA_PREFIX'] = r'C:\Program Files\Tesseract-OCR' def remove_special_characters(text): text = re.sub(r'[{}]+'.format(punctuation), '', text) # 去除特殊字符 text = re.sub(r'\s+', '', text) # 去除空格和换行符 return text def __convert_to_minutes(time_str): """ 将视频时长的字符串格式转换为分钟数。 :param time_str: 视频时长的字符串,格式为 'HH:MM:SS' 或 'MM:SS' :return: 转换后的分钟数 """ if len(time_str.split(':')) == 2: hours = 0 minutes, seconds = time_str.split(':') else: hours, minutes, seconds = map(int, time_str.split(':')) return int(hours) * 60 * 60 + int(minutes) * 60 + int(seconds) def get_region_text(region): # 截图(基于坐标) im = pyautogui.screenshot(region=region) im.save('my_screenshot.png') # 使用pytesseract识别截图中的文字 text = pytesseract.image_to_string(im, lang='chi_sim') # print("识别文字(raw):", text) text_new = remove_special_characters(text) # print("识别文字(new):", text_new) return text_new # 视频时长(秒) def get_video_duration(str_raw): duration_seconds = -1 try: duration_str = str_raw.split("/")[-1].strip() duration_seconds = int(__convert_to_minutes(duration_str)) except: pass return duration_seconds if __name__ == '__main__': # 时长 video_duration_raw = get_region_text((340, 1689, 160, 62)) video_duration = get_video_duration(video_duration_raw) # 视频介绍 video_content = get_region_text((259, 1774, 1024, 70)) # 喜欢 try: video_like = int(get_region_text((1699, 1888, 85, 46))) except: video_like = -1 print("视频时长:", video_duration) print('视频介绍:', video_content) print("视频喜欢数:", video_like)2、CnOCR实际体验下来,方式一的识别结果不如人意;如果要使用 pytesseract,建议自己训练数据集,提高准确率CnOCR 是基于 PyTorch 的超棒中英文 OCR Python 工具包;它自带 20 多个针对不同应用场景的训练有素的模型,安装即可使用项目地址:https://github.com/breezedeus/CnOCR首先,需要安装 C++ 生成工具https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/然后,安装依赖包pip install cnocr[ort-cpu]核心源码如下:import pyautogui, os, re from zhon.hanzi import punctuation from cnocr import CnOcr # pip3 install cnocr[ort-cpu] def __convert_to_minutes(time_str): """ 将视频时长的字符串格式转换为分钟数。 :param time_str: 视频时长的字符串,格式为 'HH:MM:SS' 或 'MM:SS' :return: 转换后的分钟数 """ # 如果没有小时部分,我们需要将小时设置为0 if len(time_str.split(':')) == 2: hours = 0 minutes, seconds = time_str.split(':') else: # 使用分割函数 split,如果没有小时部分,将默认小时部分为0 hours, minutes, seconds = map(int, time_str.split(':')) return int(hours) * 60 * 60 + int(minutes) * 60 + int(seconds) def get_region_text(region): im = pyautogui.screenshot(region=region) im.save('my_screenshot.png') ocr = CnOcr() result = ocr.ocr('my_screenshot.png') text = result[0].get("text") print("识别文字(raw):", text) return text # 视频时长(秒) def get_video_duration(str_raw): duration_seconds = -1 try: duration_str = str_raw.split("/")[-1].strip() duration_seconds = int(__convert_to_minutes(duration_str)) except: pass return duration_seconds if __name__ == '__main__': # 时长 video_duration_ = get_region_text((340, 1689, 160, 62)) video_duration = get_video_duration(video_duration_) video_content = get_region_text((259, 1774, 1024, 70)) # 喜欢 try: video_like = int(get_region_text((1699, 1888, 85, 46))) except: video_like = -1 print("视频时长:", video_duration) print('视频介绍:', video_content) print("视频喜欢数:", video_like)3、PaddleOCRPaddleOCR 是百度开源的深度学习框架 PaddlePaddle 下的 OCR 工具集,支持多种语言的文字检测与识别;它具有易用性、高效性,并提供丰富的文档和模型,适用于多种场景的文字识别任务项目地址:https://github.com/PaddlePaddle/PaddleOCR首先,需要安装 PaddlePaddlepip3 install paddlepaddle -i https://mirror.baidu.com/pypi/simple然后,安装 PaddleOCR whl 包pip3 install "paddleocr>=2.0.1" # 推荐使用2.0.1+版本核心源码如下: import pyautogui, os, re from paddleocr import PaddleOCR def get_region_text(region): im = pyautogui.screenshot(region=region) im.save('my_screenshot.png') ocr = PaddleOCR(use_angle_cls=True, lang="ch", use_gpu=True) # need to run only once to download and load model into memory img_path = 'my_screenshot.png' text = ocr.ocr(img_path, cls=True)[0][0][-1][0] print("识别文字(raw):", text) return text if __name__ == '__main__': # 时长 video_duration_ = get_region_text((340, 1689, 160, 62)) video_duration = get_video_duration(video_duration_) # 视频介绍(不精确) video_content = get_region_text((259, 1774, 1024, 70)) # 喜欢 try: video_like = int(get_region_text((1699, 1888, 85, 46))) except: video_like = -1 print("视频时长:", video_duration) print('视频介绍:', video_content) print("视频喜欢数:", video_like) 4、实战一下 以某音为例,要筛选出合适的账号和片子,我们需要先借助工具获取元素的坐标(视频内容、喜欢数、时长等),并配置筛选关键字和喜欢阈值 if __name__ == '__main__': # 坐标配置 duration_region = (187, 1879, 186, 52) # 视频时长 content_region = (144, 1694, 622, 141) # 内容,包含多行 like_region = (2102, 1295, 159, 58) # 喜欢数 studio_video_region = (138, 1698, 111, 59) # 左下角:直播中 share_url_region = 2211, 1715 # 分享ICON copy_url_region = 1747, 1698 # 拷贝URL到剪切板 dy_video_region = 1314, 1155 # 视频中间位置(方便暂停播放,提取视频时长) # 视频保存目录 output_path = 'C:\\Users\\xx\\Desktop\\' output_video_path = f'{output_path}video_result.txt' # 运行日志 timestamp = datetime.datetime.now().strftime('%Y%m%d_%H%M%S') file_name = f'log_{timestamp}.txt' output_log_path = f'{output_path}{file_name}' logger = Logger(output_log_path) # 喜欢数阈值(5000) like_target = 5 * 1000 # 时长限制(秒) video_duration_min = 45 video_duration_max = 120 # 关键字 keywords = ['xx1', 'xx2']然后编写过滤逻辑和数据写入本地逻辑 def current_video_check(): # 时长 video_duration_ = get_region_text(duration_region) video_duration = get_video_duration(video_duration_) logger.debug("视频时长:" + str(video_duration)) ... # 视频介绍 video_content = get_region_text(content_region) logger.debug("视频介绍:" + str(video_content)) if not contain_keywords(video_content) or '广告' in video_content: video_content_result = False return video_duration_result, video_content_result, video_like_result else: video_content_result = True # 喜欢 try: video_like_str = get_region_text(like_region) video_like = get_like_count(video_like_str) except: video_like = -1 logger.debug("视频喜欢数:" + str(video_like)) if video_like < like_target: video_like_result = False else: video_like_result = True return video_duration_result, video_content_result, video_like_result # 写入数据 def write_to_file(): # 移动到复制按钮处,显示复制悬浮框 pyautogui.moveTo(share_url_region) time.sleep(1) # 点击复制按钮,将内容复制到剪切板 pyautogui.click(copy_url_region) ... # 点击界面,关闭复制弹框 pyautogui.click(dy_video_region) 最后模拟刷视频的动作,通过上面的筛选条件过滤出合适的数据 def start(): # 点击视频画面,停止播放,并窗口focus pyautogui.click(dy_video_region) while True: video_duration_result, video_content_result, video_like_result = current_video_check() if video_duration_result and video_content_result and video_like_result: write_to_file() elif not video_duration_result: logger.error("Fail-时长不满足要求") elif not video_content_result: logger.error("Fail-视频内容不满足要求") elif not video_like_result: logger.error("Fail-视频点赞数不满足要求") # 下一个片子 # 模拟按下方向下键 pyautogui.press('down') # 等待一段时间 time.sleep(random.uniform(0.5, 2.0)) if is_studio_video(): print("直播间,过滤。。。") pyautogui.press('down') time.sleep(1) else: # 模拟按下空格键(暂停) # pyautogui.press('space') pyautogui.click(dy_video_region)完整思路及核心源码上面已全部包含。
2024年06月03日
79 阅读
0 评论
1 点赞
2024-06-02
手动下载抖音无水印视频教程
前言本教程为抖音视频无水印下载教程,通过浏览器开发者工具进行下载操作,操作简单!教程开始1:首先准备好需要下载视频的连接,粘贴在浏览器顶部的地址栏中进行访问;本视频以视频链接https://v.douyin.com/ijSaTTgN/ 作为教程2:按下键盘F12进入开发者工具,选择网络-媒体3:按下键盘F5进行刷新,刷新完成后此处会出现各种英文组合开头的名称4:点击这个地址,复制红框部分的网页地址,粘贴在浏览器新的标签页中进行访问,则会自动提示下载5:下载完成后,修改文件名,后缀html修改为mp4即可,到此教程完成{dotted startColor="#ff6c6c" endColor="#1989fa"/}{alert type="info"}内容为原创帖,勿转载!{/alert}
2024年06月02日
98 阅读
0 评论
1 点赞