generated from Ash258/GenericBucket
/
bilibili.json
50 lines (50 loc) · 1.97 KB
/
bilibili.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"version": "1.13.2",
"description": "Online vedio app.",
"homepage": "https://www.bilibili.com",
"license": "Freeware",
"url": "https://dl.hdslb.com/mobile/fixed/bili_win/bili_win-install.exe#/dl.7z",
"hash": "sha512:ddb8af3d23b4ca86fb389e235f4ebbfb68219c815b6171215ff1130acc5457b2987f914bf3b1374c5cb2d4a7c77b41c3090ca610f25c11075dbbf12df99f08ba",
"installer": {
"script": "Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\""
},
"post_install": "Remove-Item \"$dir\\`$PLUGINSDIR\" -Force -Recurse",
"bin": [
[
"哔哩哔哩.exe",
"哔哩哔哩"
]
],
"shortcuts": [
[
"哔哩哔哩.exe",
"哔哩哔哩"
]
],
"checkver": {
"script": [
"$url = 'https://api.bilibili.com/x/elec-frontend/update/latest.yml'",
"$cont = Invoke-RestMethod $url",
"$r = 'version:\\s*([\\d.]+)'",
"if (!($cont -match $r)) { Write-Error \"Could not match $r in $url\"; continue }",
"$ver = $matches[1]",
"$assetUrl = \"https://api.bilibili.com/x/elec-frontend/update/bilibili-setup-v$ver.exe.blockmap\"",
"$assetReq = [System.Net.HttpWebRequest]::Create($assetUrl)",
"$assetReq.Headers.Add('appversion', '0.0.0')",
"$assetCont = $assetReq.GetResponse().ResponseUri.AbsoluteUri",
"$r = 'win/([\\d]+)/public'",
"if (!($assetCont -match $r)) { Write-Error \"Could not match $r in $url\"; continue }",
"$code = $matches[1]",
"Write-Output $ver $code"
],
"regex": "([\\d.]+) (?<code>[\\w.]+)"
},
"autoupdate": {
"url": "https://dl.hdslb.com/mobile/fixed/bili_win/bili_win-install.exe#/dl.7z",
"hash": {
"url": "https://api.bilibili.com/x/elec-frontend/update/latest.yml",
"regex": "sha512:\\s+$base64"
}
},
"notes": "Check version number manually."
}