-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Invoke-WebRequest Example 1 No InputFields Returned #10829
Copy link
Copy link
Closed
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility module
Description
Type of issue
Outdated article
Feedback
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, ValueExpected Response:
name value
---- -----
From Value 1
To Value 5280
Actual Response:
None
Screenshot of debugger $Response object:

Page URL
Content source URL
Author
Document Id
b2e7e015-35b9-897c-3581-ad982240c97c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-utilityArea - Microsoft.PowerShell.Utility moduleArea - Microsoft.PowerShell.Utility module