Created
April 7, 2021 20:35
-
-
Save IAmStoxe/d7a757ad3a97c2cd847fc9336ebd9222 to your computer and use it in GitHub Desktop.
Search Microsoft Documentation via RSS
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
https://docs.microsoft.com/api/search/rss?search=SEARCH_TERM_HERE&locale=en-us |
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
$qry = "REPLACE ME" | |
$headers = @{} | |
$headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0") | |
$headers.Add("host", "docs.microsoft.com") | |
$headers.Add("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") | |
$headers.Add("accept-language", "en-US,en;q=0.5") | |
$headers.Add("accept-encoding", "gzip, deflate, br") | |
$headers.Add("cache-control", "max-age=0") | |
Invoke-RestMethod -Uri "http://docs.microsoft.com/api/search/rss?search=$qry&locale=en-us" -Method GET -Headers $headers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment