You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invoke-WebRequest Example 1 No InputFields Returned #10829
The code mentioned in the first example works correctly, but the returned InputFields from Bing do not contain any names matching "* Value". I think this is because Bing changed how the input fields are loaded / presented on the page.
When navigating directly to the link, those fields do exist. When I look through the $Response HTML, I can not find the input fields that were present on the web page.
Code used:
$Response=Invoke-WebRequest-URI https://www.bing.com/search?q=how+many+feet+in+a+mile
$Response.InputFields|Where-Object {
$_.name-like"* Value*"
} |Select-Object Name, Value
Activity
[-]Example 1 Broken[/-][+]Invoke-WebRequest Example 1 No InputFields Returned[/+]sdwheeler commentedon Jan 25, 2024
You were looking at the documentation for PowerShell 7.4 but it looks like you were running the example in Windows PowerShell 5.1.
The correct way to run it in Windows PowerShell 5.1 is:
Output:
beingmerry commentedon Jan 25, 2024
Got it. Thanks!