Are there tools for analyzing HTML?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
omar
Posts: 539
Joined: 22 Oct 2015, 17:56

Are there tools for analyzing HTML?

Post by omar » 21 Oct 2021, 11:56

I have a load of HTML.
I want to get data on specific tags.
Is there AHK code that has tools that will help me search through and find what I want?
I was hoping there would be ready made tools, else I'll have to perform some sort of text search.

Thanks.

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Are there tools for analyzing HTML?

Post by malcev » 21 Oct 2021, 14:59

Chrome DevTools.

omar
Posts: 539
Joined: 22 Oct 2015, 17:56

Re: Are there tools for analyzing HTML?

Post by omar » 21 Oct 2021, 18:05

A bit confused.
Chrome Dev tool is relating to Chrome?
How would I use AHK to get the information I needed?
Is there some sort of interface that AHK can access?

I was thinking of grabbing many pages of HTML and processing one by one.

Any examples you can give would be really nice.
Thanks.

teadrinker
Posts: 4309
Joined: 29 Mar 2015, 09:41
Contact:

Re: Are there tools for analyzing HTML?

Post by teadrinker » 21 Oct 2021, 18:53

Perhaps HTMLFile object is what you need:

Code: Select all

html =
(
<!DOCTYPE html>
<html>
<body>
   <div>
      <p>One line</p>
      <p>Another one</p>
   </div>
</body>
</html>
)
document := ComObjCreate("HTMLFile")
document.write("<meta http-equiv=""X-UA-Compatible"" content=""IE=edge"">")
document.write(html)

text := document.querySelector("div").innerText
MsgBox, % text

Post Reply

Return to “Ask for Help (v1)”