Find search term in webpage with Chrome/FF/Edge

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
tecc
Posts: 12
Joined: 24 Dec 2018, 01:18

Find search term in webpage with Chrome/FF/Edge

13 Feb 2024, 09:43

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.
User avatar
joedf
Posts: 8986
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

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

13 Feb 2024, 10:53

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?
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
tecc
Posts: 12
Joined: 24 Dec 2018, 01:18

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

14 Feb 2024, 05:11

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.
User avatar
joedf
Posts: 8986
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

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

14 Feb 2024, 15:13

Are you trying to scrape information from a webpage? Do you have example html code you want to extract from?
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
tecc
Posts: 12
Joined: 24 Dec 2018, 01:18

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

15 Feb 2024, 06:25

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.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Archimede and 40 guests