jetsung hat die Gist bearbeitet 7 months ago. Zu Änderung gehen
Keine Änderungen
jetsung hat die Gist bearbeitet 7 months ago. Zu Änderung gehen
1 file changed, 1 insertion, 1 deletion
windows.ps1
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | #============================================================ | |
| 2 | - | # File: download_chrome_crx.ps1 | |
| 2 | + | # File: download-chrome-crx.ps1 | |
| 3 | 3 | # Description:从 Chomne 扩展 ID 列表中下载最新的扩展保存至本地文件夹 | |
| 4 | 4 | # URL: https://fx4.cn/wdlcrx | |
| 5 | 5 | # ORIGIN: https://gist.asfd.cn/jetsung/download-crx/raw/HEAD/windows.ps1 | |
jetsung hat die Gist bearbeitet 7 months ago. Zu Änderung gehen
1 file changed, 2 insertions, 2 deletions
download_chrome_crx.ps1 umbenannt zu windows.ps1
| @@ -2,9 +2,9 @@ | |||
| 2 | 2 | # File: download_chrome_crx.ps1 | |
| 3 | 3 | # Description:从 Chomne 扩展 ID 列表中下载最新的扩展保存至本地文件夹 | |
| 4 | 4 | # URL: https://fx4.cn/wdlcrx | |
| 5 | - | # ORIGIN: https://gist.asfd.cn/jetsung/chromecrx/raw/HEAD/download_chrome_crx.ps1 | |
| 5 | + | # ORIGIN: https://gist.asfd.cn/jetsung/download-crx/raw/HEAD/windows.ps1 | |
| 6 | 6 | # Author: Jetsung Chan <[email protected]> | |
| 7 | - | # Version: 0.1.0 | |
| 7 | + | # Version: 0.1.1 | |
| 8 | 8 | # CreatedAt: 2025-08-21 | |
| 9 | 9 | # UpdatedAt: 2025-08-21 | |
| 10 | 10 | #============================================================ | |
jetsung hat die Gist bearbeitet 7 months ago. Zu Änderung gehen
1 file changed, 8 insertions, 7 deletions
download_chrome_crx.ps1
| @@ -1,7 +1,7 @@ | |||
| 1 | 1 | #============================================================ | |
| 2 | 2 | # File: download_chrome_crx.ps1 | |
| 3 | 3 | # Description:从 Chomne 扩展 ID 列表中下载最新的扩展保存至本地文件夹 | |
| 4 | - | # URL: https://s.fx4.cn/wdlcrx | |
| 4 | + | # URL: https://fx4.cn/wdlcrx | |
| 5 | 5 | # ORIGIN: https://gist.asfd.cn/jetsung/chromecrx/raw/HEAD/download_chrome_crx.ps1 | |
| 6 | 6 | # Author: Jetsung Chan <[email protected]> | |
| 7 | 7 | # Version: 0.1.0 | |
| @@ -12,7 +12,8 @@ | |||
| 12 | 12 | param( | |
| 13 | 13 | [Parameter(Mandatory=$true)] | |
| 14 | 14 | [string]$ListFile, # 第 1 个位置参数:扩展 ID 列表文件 | |
| 15 | - | [string]$Proxy = '' # 第 2 个可选参数:代理地址 'http://127.0.0.1:1088',如果是 SOCKS5,改成 socks5h://127.0.0.1:1080 | |
| 15 | + | [string]$Pkg = 'crx', # 第 2 个位置参数:保存的文件格式,默认 crx | |
| 16 | + | [string]$Proxy = '' # 第 3 个可选参数:代理地址 'http://127.0.0.1:1088',如果是 SOCKS5,改成 socks5h://127.0.0.1:1080 | |
| 16 | 17 | ) | |
| 17 | 18 | ||
| 18 | 19 | Get-Content $ListFile | ForEach-Object { | |
| @@ -20,9 +21,9 @@ Get-Content $ListFile | ForEach-Object { | |||
| 20 | 21 | if (-not $id) { continue } | |
| 21 | 22 | ||
| 22 | 23 | $url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=135.0&acceptformat=crx2,crx3&x=id%3D$id%26uc" | |
| 23 | - | $outFile = "$PWD\$id.zip" | |
| 24 | + | $outFile = "$PWD\$id.$Pkg" | |
| 24 | 25 | ||
| 25 | - | Write-Host "下载 $id.zip ..." | |
| 26 | + | Write-Host "下载: https://chromewebstore.google.com/detail/$id " | |
| 26 | 27 | try { | |
| 27 | 28 | if ($Proxy) { | |
| 28 | 29 | Invoke-WebRequest -Uri $url -Proxy $Proxy -OutFile $outFile | |
| @@ -35,6 +36,6 @@ Get-Content $ListFile | ForEach-Object { | |||
| 35 | 36 | } | |
| 36 | 37 | } | |
| 37 | 38 | ||
| 38 | - | # Invoke-WebRequest -Uri "https://s.fx4.cn/wdlcrx" -OutFile "download-crx.ps1" | |
| 39 | - | # 本地: .\download-crx.ps1 E:\chromium.txt http://127.0.0.1:1088 | |
| 40 | - | # 网络: & ([scriptblock]::Create((irm https://s.fx4.cn/wdlcrx))) E:\chromium.txt http://127.0.0.1:1088 | |
| 39 | + | # Invoke-WebRequest -Uri "https://fx4.cn/wdlcrx" -OutFile "download-crx.ps1" | |
| 40 | + | # 本地: .\download-crx.ps1 E:\chromium.txt crx http://127.0.0.1:1088 | |
| 41 | + | # 网络: & ([scriptblock]::Create((irm https://fx4.cn/wdlcrx))) E:\chromium.txt crx http://127.0.0.1:1088 | |
jetsung hat die Gist bearbeitet 9 months ago. Zu Änderung gehen
1 file changed, 40 insertions
download_chrome_crx.ps1(Datei erstellt)
| @@ -0,0 +1,40 @@ | |||
| 1 | + | #============================================================ | |
| 2 | + | # File: download_chrome_crx.ps1 | |
| 3 | + | # Description:从 Chomne 扩展 ID 列表中下载最新的扩展保存至本地文件夹 | |
| 4 | + | # URL: https://s.fx4.cn/wdlcrx | |
| 5 | + | # ORIGIN: https://gist.asfd.cn/jetsung/chromecrx/raw/HEAD/download_chrome_crx.ps1 | |
| 6 | + | # Author: Jetsung Chan <[email protected]> | |
| 7 | + | # Version: 0.1.0 | |
| 8 | + | # CreatedAt: 2025-08-21 | |
| 9 | + | # UpdatedAt: 2025-08-21 | |
| 10 | + | #============================================================ | |
| 11 | + | ||
| 12 | + | param( | |
| 13 | + | [Parameter(Mandatory=$true)] | |
| 14 | + | [string]$ListFile, # 第 1 个位置参数:扩展 ID 列表文件 | |
| 15 | + | [string]$Proxy = '' # 第 2 个可选参数:代理地址 'http://127.0.0.1:1088',如果是 SOCKS5,改成 socks5h://127.0.0.1:1080 | |
| 16 | + | ) | |
| 17 | + | ||
| 18 | + | Get-Content $ListFile | ForEach-Object { | |
| 19 | + | $id = $_.Trim() | |
| 20 | + | if (-not $id) { continue } | |
| 21 | + | ||
| 22 | + | $url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=135.0&acceptformat=crx2,crx3&x=id%3D$id%26uc" | |
| 23 | + | $outFile = "$PWD\$id.zip" | |
| 24 | + | ||
| 25 | + | Write-Host "下载 $id.zip ..." | |
| 26 | + | try { | |
| 27 | + | if ($Proxy) { | |
| 28 | + | Invoke-WebRequest -Uri $url -Proxy $Proxy -OutFile $outFile | |
| 29 | + | } else { | |
| 30 | + | Invoke-WebRequest -Uri $url -OutFile $outFile | |
| 31 | + | } | |
| 32 | + | Write-Host "已保存:$outFile" | |
| 33 | + | } catch { | |
| 34 | + | Write-Warning "下载失败:$id ($($_.Exception.Message))" | |
| 35 | + | } | |
| 36 | + | } | |
| 37 | + | ||
| 38 | + | # Invoke-WebRequest -Uri "https://s.fx4.cn/wdlcrx" -OutFile "download-crx.ps1" | |
| 39 | + | # 本地: .\download-crx.ps1 E:\chromium.txt http://127.0.0.1:1088 | |
| 40 | + | # 网络: & ([scriptblock]::Create((irm https://s.fx4.cn/wdlcrx))) E:\chromium.txt http://127.0.0.1:1088 | |