请问下载有办法免费批量下载bilibili以及其他平台的视频吗?
用猫爪只能一个一个打开,合并,下载。
其他插件都要付费。
有办法一下下载一个专辑的视频吗?
另外如果有 小红书 抖音 的插件也请推荐一下
逼得我用au3自己写 猫爪自动,但是太慢,还老报错不好用
Global $isPaused = False
Global $status = "运行中"
; ===== 浮窗位置(屏幕中间偏下)=====
Global $posX = @DesktopWidth / 2 - 150
Global $posY = @DesktopHeight - 120
; 绑定快捷键
HotKeySet("{SPACE}", "TogglePause")
HotKeySet("{ESC}", "ExitScript")
While 1
While $isPaused
$status = "已暂停"
ShowStatus("-", "-", "-")
Sleep(200)
WEnd
$status = "运行中"
Sleep(4000)
;~ MouseClick("left", 1697, 68, 1);猫
Sleep(500)
;~ MouseClick("left", 1734, 987, 1);反选
Sleep(500)
MouseClick("left", 1566, 187, 1);1
Sleep(500)
MouseClick("left", 1566, 225, 1);2
Sleep(500)
MouseClick("left", 1590, 987, 1);在线合并
Sleep(500)
MouseClick("left", 134, 21, 1);返回公开课
;~ Sleep(500)
;~ MouseClick("left", 718, 568, 1);停止视频
WaitNewFile("C:\Users\user\Downloads")
Sleep(1000)
; ===== 等待像素(带显示)=====
;~ WaitPixel(768, 19, 0xD3E3FD)
;~ Sleep(1000)
;~ MouseClick("left", 1697, 68, 1) ; 猫
;~ MouseClick("left", 1697, 68, 1); 猫
Sleep(500)
MouseClick("left", 1808, 990, 1) ; 清空
Sleep(500)
MouseClick("left", 493, 21, 1) ; 关闭猫页面
Sleep(500)
MouseMove( 151, 830)
Sleep(1500)
MouseClick("left", 151, 830, 1) ; 下一页
Sleep(500)
WEnd
; ===== 功能函数 =====
Func TogglePause()
$isPaused = Not $isPaused
EndFunc
Func ExitScript()
Exit
EndFunc
; ===== 核心:带浮窗的等待函数 =====
Func WaitPixel($x, $y, $targetColor, $timeout = 0)
Local $start = TimerInit()
While 1
; 支持暂停
While $isPaused
$status = "已暂停"
ShowStatus($x & "," & $y, $targetColor, "-")
Sleep(200)
WEnd
$status = "等待像素"
Local $currentColor = PixelGetColor($x, $y)
; 转16进制显示
Local $targetHex = "0x" & Hex($targetColor, 6)
Local $currentHex = "0x" & Hex($currentColor, 6)
; ===== 显示浮窗 =====
ShowStatus($x & "," & $y, $targetHex, $currentHex)
; ===== 判断 =====
If $currentColor = $targetColor Then
$status = "匹配成功"
ShowStatus($x & "," & $y, $targetHex, $currentHex)
Sleep(300)
ExitLoop
EndIf
; 超时
If $timeout > 0 Then
If TimerDiff($start) > $timeout Then ExitLoop
EndIf
Sleep(1000)
WEnd
EndFunc
; ===== 浮窗显示函数 =====
Func ShowStatus($pos, $target, $current)
Local $text = _
"坐标: " & $pos & @CRLF & _
"目标颜色: " & $target & @CRLF & _
"当前颜色: " & $current & @CRLF & _
"状态: " & $status
ToolTip($text, $posX, $posY)
EndFunc
Func WaitNewFile($folderPath, $timeout = 0)
Local $start = TimerInit()
; ===== 记录初始文件数量 =====
Local $initialCount = _FileCount($folderPath)
While 1
; 支持暂停(空格)
While $isPaused
$status = "已暂停(文件检测)"
ShowStatus("文件夹", "-", "-")
Sleep(200)
WEnd
$status = "等待新文件"
Local $currentCount = _FileCount($folderPath)
; ===== 浮窗显示 =====
ShowStatus($folderPath, "初始:" & $initialCount, "当前:" & $currentCount)
; ===== 检测是否新增 =====
If $currentCount > $initialCount Then
$status = "检测到新文件"
ShowStatus($folderPath, "初始:" & $initialCount, "当前:" & $currentCount)
Sleep(300)
ExitLoop
EndIf
; 超时控制
If $timeout > 0 Then
If TimerDiff($start) > $timeout Then ExitLoop
EndIf
Sleep(500)
WEnd
EndFunc
Func _FileCount($path)
Local $count = 0
Local $search = FileFindFirstFile($path & "\*.*")
If $search = -1 Then Return 0
While 1
Local $file = FileFindNextFile($search)
If @error Then ExitLoop
; 排除文件夹(只统计文件)
If Not StringInStr(FileGetAttrib($path & "\" & $file), "D") Then
$count += 1
EndIf
WEnd
FileClose($search)
Return $count
EndFunc
;https://www.bilibili.com/list/650649630/?spm_id_from=333.1387.0.0&sort_field=pubtime&tid=0&oid=444042401&bvid=BV14L411z79C
;50
;第2课:绩效管理体系与运营