I am having problems accessing an invoked webpage HtmlWebResponseObject object. It was obtained by:
PS>$webpage = Invoke-WebRequest -uri "https://www.grittv.com/tv-schedule/"
After trying to parse/inquire it with:
PS>$webpage.AllElements
it just sits there with a blinking cursor until I cancel it (30 minutes+ at one time)
Here are some investigations:
PS>$webpage | get-member
TypeName: Microsoft.PowerShell.Commands.HtmlWebResponseObject
Name MemberType Definition
---- ---------- ----------
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
AllElements Property Microsoft.PowerShell.Commands.WebCmdletElementCollectio...
BaseResponse Property System.Net.WebResponse BaseResponse {get;set;}
Content Property string Content {get;}
Forms Property Microsoft.PowerShell.Commands.FormObjectCollection Form...
Headers Property System.Collections.Generic.Dictionary[string,string] He...
Images Property Microsoft.PowerShell.Commands.WebCmdletElementCollectio...
InputFields Property Microsoft.PowerShell.Commands.WebCmdletElementCollectio...
Links Property Microsoft.PowerShell.Commands.WebCmdletElementCollectio...
ParsedHtml Property mshtml.IHTMLDocument2 ParsedHtml {get;}
RawContent Property string RawContent {get;set;}
RawContentLength Property long RawContentLength {get;}
RawContentStream Property System.IO.MemoryStream RawContentStream {get;}
Scripts Property Microsoft.PowerShell.Commands.WebCmdletElementCollectio...
StatusCode Property int StatusCode {get;}
StatusDescription Property string StatusDescription {get;}
PS>$webpage.RawContentLength
139792
PS>$webpage.gettype()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False HtmlWebResponseObject Microsoft.PowerShell.Commands.WebResponseObject
Status code returns 200
and OK
What is holding parsing up?
Can you help with invoking this data?
Also, it did work one time, I believe. I closed my scripts, came back another day, and it, since, just seemingly hangs.
Invoking on a second computer gave the same results.
Thanks