- # download TIM.exe
- # ps5.1 $result.Content 乱码:utf8解析成ANSI,建议用pwsh 7+
- $result = Invoke-WebRequest -Uri 'https://im.qq.com/rainbow/TIMDownload/' -UseBasicParsing
- if ($result.Content -match '(?s)(?>var\s+params\s*=[^{]*)(?<body>\{(?>/\*.*?\*/|//[^\n]*|"(?>""|\\"|[^"])*"|[^{}]|(?<o>{)|(?<-o>}))*}(?(o)(?!)))') {
- $ojson = ConvertFrom-Json $Matches['body']
- $ojson.app.download
- }
复制代码 乱码不影响下载链接的读取.建议用pwsh 7+ |