Advertisement
metalx1000

Get InnerHTML of all DIV tags on a web page

Jun 19th, 2014
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $Browser = New-Object -COM "InternetExplorer.Application"
  2. $URL = "http://filmsbykris.com/v6/index.php"
  3.  
  4. $Browser.Navigate($URL)
  5. While ($Browser.ReadyState -ne 4) { Start-Sleep -Seconds 1 }
  6.  
  7. $Divs = $Browser.Document.getElementsByTagName("DIV")
  8.  
  9. ForEach ($Div in $Divs)
  10. {
  11.     $DivText = $Div.InnerHTML.ToString()
  12.     write-output $DivText
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement