Page 1 of 1

Find search term in webpage with Chrome/FF/Edge

Posted: 13 Feb 2024, 09:43
by tecc
Hi guys,

I've browsed a lot of threads here but apparently it only refers to IE or is too complicated. I need to search the text of a webpage for the term '+A' and append the result to a text file like this:

https://long.winded.url/ending.on.aspx?with=parameters|yes
https://long.winded.url/ending.on.aspx?with=parameters|no

Any help would be appreciated.

Re: Find search term in webpage with Chrome/FF/Edge

Posted: 13 Feb 2024, 10:53
by joedf
If you are using javascript, you use can URLSearchParams.

In autohotkey, you'll need to parse it. You could use RegEx or just string functions.
What part in particular are you trying to get? is it just the yes and no?

Re: Find search term in webpage with Chrome/FF/Edge

Posted: 14 Feb 2024, 05:11
by tecc
The string is simple, somewhere on the website reads ' + A'. In the HTML code it looks like this: + A</td> so a string function should suffice.

Re: Find search term in webpage with Chrome/FF/Edge

Posted: 14 Feb 2024, 15:13
by joedf
Are you trying to scrape information from a webpage? Do you have example html code you want to extract from?

Re: Find search term in webpage with Chrome/FF/Edge

Posted: 15 Feb 2024, 06:25
by tecc
There's a number of stores I need to check for a certain hardware to be installed. If it is installed, the text of the webpage will contain the term +A. I could also use CTRL-F to have the browser search the text. And if it returns a 1, I would write that into a text file.