Re: Help me get this image
Looking at the source code, it appears as though they provide the JSON that powers the page in the document via the #__NEXT_DATA__ script element.
So for example, I can do this from my console:
- Get the script tag by calling
Code:
document.querySelector('#__NEXT_DATA__')
- Get the JSON literal by calling
Code:
JSON.parse(document.querySelector('#__NEXT_DATA__').innerText)
- Traverse the JSON by accessing
Code:
props.pageProps.data.results.titles[0].image
So to do this from VB.NET, you would use your HtmlAgilityPack to parse the HTML and select the #__NEXT_DATA__ script element. Use JSON.NET or Newtonsoft.JSON to parse the JSON literal to a strongly typed class. And then finally access the property via the path above.