Forum Discussion
heriberto_mb
1 year agoFrequent Visitor
Extract data after html tag
I want to extract the system status from the following page: https://www.akamaistatus.com/ I was able to pull the html data, now I just want to pull the line that says "All Systems Operational"...
- 1 year ago
pls try this
let Source = Text.FromBinary(Web.Contents("https://www.akamaistatus.com/")), Text = Text.BetweenDelimiters( Source, "<span class=""status font-large"">", "<span class=""last-updated-stamp font-small""></span>" ), ImportedText = List.RemoveMatchingItems( List.Transform(Lines.FromText(Text),(x)=> Text.Trim(x)),{""}){0} in ImportedText
lbendlin
1 year agoSuper User
Best to use Web.BrowserContents and then play with Html.Table parsing
let
Source = Web.BrowserContents("https://www.akamaistatus.com/"),
#"Extracted Table From Html" = Html.Table(Source, {{"Column1", ".font-small + *"}, {"Column2", ".component-inner-container:nth-child(2) .name"}, {"Column3", ".component-inner-container:nth-child(3) .name"}, {"Column4", ".component-status.tool"}, {"Column5", ".component-inner-container:nth-child(2) .component-status"}, {"Column6", ".component-inner-container:nth-child(3) .component-status"}, {"Column7", ".component-inner-container:nth-child(4) .name"}, {"Column8", ".component-inner-container:nth-child(4) .component-status"}}, [RowSelector=".component-container"])
in
#"Extracted Table From Html"- heriberto_mb1 year agoFrequent Visitor
Thank you very much for your answer, I see multiple outputs with their status...but I was looking just to capture the general status of the page: "All systems operational".