I've been relatively successful using variations of the following to scrape web data.
$url = “https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2019-1331"
$response = Invoke-WebRequest -Uri $url
$response.ParsedHtml.body.getElementsByClassName('css-247') | select -expand innertext
I cannot get the data that is stored in a paragraph tag in the url listed in the code.
<div class="css-247">
<p>
'Text I want to copy
I am assuming the P is not 'inner text'? How can I grab that Text?
If I copy XPath where the text is: it's at /html/body/div/div/div/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div[3]/div[2]/div/div/div/div/div/div/p[1]
If I copy cssPath I get:
html body.ms-Fabric--isFocusHidden div#root div.ms-Fabric.root-41 div.css-43 div.ms-Stack.css-87 div.ms-Stack.css-87 div.ms-ScrollablePane.root-88 div.ms-ScrollablePane--contentContainer.contentContainer-89 div.ms-Stack.css-93 div.ms-Stack.css-110 div.ms-ScrollablePane.root-88 div.ms-ScrollablePane--contentContainer.contentContainer-89 div div div#executiveSummary.ms-Stack.ms-Card.css-136 div.ms-Stack.ms-CardSection.css-138 div.ms-Shimmer-container.root-113 div.ms-Shimmer-dataWrapper.dataWrapper-140 div.ms-StackItem.ms-CardItem.css-246 div.css-247 p