Author Posts

February 13, 2017 at 10:54 pm

I have filtred som info fram Invoke-WebRequest and managed to bring out the content of a specific DIV tag.
This Content is now stored in $forecast and the content is as follows:



 
Or

Hassel

Salix

Bjørk

Gress

Burot


ma
ti
ma
ti
ma
ti
ma
ti
ma
ti
ma
ti

Østlandet med Oslo
 
 
 
 
 
 
 
 
 
 
 
 

Sørlandet
 
 
 
 
 
 
 
 
 
 
 
 

Rogaland
 
 
 
 
 
 
 
 
 
 
 
 

Hordaland
 
 
 
 
 
 
 
 
 
 
 
 

Sogn og Fjordane
 
 
 
 
 
 
 
 
 
 
 
 

Møre og Romsdal
 
 
 
 
 
 
 
 
 
 
 
 

Indre Østlandet
 
 
 
 
 
 
 
 
 
 
 
 

Sentrale fjellstrøk i Sør-Norge
 
 
 
 
 
 
 
 
 
 
 
 

Trøndelag
 
 
 
 
 
 
 
 
 
 
 
 

Nordland
 
 
 
 
 
 
 
 
 
 
 
 

Troms
 
 
 
 
 
 
 
 
 
 
 
 

Finnmark
 
 
 
 
 
 
 
 
 
 
 
 

How Can I here for example show everything within the tags Where the word "Sentrale_fjellstrok_i_Sor-Norge.aspx" ia?

the ultimate goal is to get the value og spesific title=

PS:
this is my code:

$pollenvarsel_web = Invoke-WebRequest "http://www.pollenvarslingen.no/forsiden/varsel.aspx"
$forecast = $pollenvarsel_web.ParsedHtml.getElementsByTagName('div') | ?{$_.ID -eq 'forecastTable'}
Write-Host ----
$forecast = $forecast.InnerHTML

$forecast

February 13, 2017 at 10:55 pm

i see the forum didn't show the HTML code correct, but just run my powershell code and you will se the output