Created
July 21, 2022 06:52
-
-
Save synodriver/ca7e9162fa48ad648c750a0c351c52e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(splash, args) | |
assert(splash:go(args.url, nil, { | |
["Cookie"] = args.cookie | |
})) | |
assert(splash:wait(1)) | |
local element = splash:select("#accessCode") | |
local ok, reason = element:send_text("glib") -- 输入提取码 | |
if not ok then | |
return reason | |
end | |
element = splash:select("#submitBtn > a > span > span") | |
ok, reason = element:mouse_click() -- 提交 | |
if not ok then | |
return reason | |
end | |
assert(splash:wait(5)) | |
element = splash:select("#shareqr > div.KPDwCE > div.zJMtAEb > div > div > dd > span") | |
ok, reason = element:mouse_click() -- 选择要保存的 | |
if not ok then | |
return reason | |
end | |
element = splash:select("#bd-main > div > div.module-share-header > div > div.slide-show-right > div > div > div.x-button-box > a.g-button.tools-share-save-hb > span > span") | |
ok, reason = element:mouse_click() -- 保存到网盘 | |
if not ok then | |
return reason | |
end | |
element = splash:select("#fileTreeDialog > div.dialog-footer.g-clearfix > a.g-button.g-button-blue-large > span > span") | |
ok, reason = element:mouse_click() -- 确定 保存到全部文件这个文件夹 | |
if not ok then | |
return reason | |
end | |
assert(splash:wait(5)) | |
return { | |
html = splash:html(), | |
png = splash:png(), | |
har = splash:har(), | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment