问题描述
我的目标是检查大约 800 个工具是否在 Microsoft Store 中可用。有没有办法通过 API 或类似的东西查询 Microsoft Store 中可用的工具? 我很感激任何建议。谢谢
解决方法
我建议使用 PowerShell 或 BASH 之类的脚本语言,或者选择您喜欢的脚本语言来自动执行 Microsoft Store Web 界面的 800 次查询,并在 PowerShell 示例中使用以下 URI 中的相应查询:
$region = 'en-us' # Variable to represent your region.
$keywords = 'Hello+World' # Tool name here,keywords separated by plus
$query = 'https://www.microsoft.com/{0}/search/explore?q={1}' -f $region,$keywords
$response = Invoke-WebRequest -Uri $query
# Parse the response HTML,e.g. $response.Links | Out-Gridview
干杯, 卡内基J