Detecting new content in a browser window

Get help with using AutoHotkey and its commands and hotkeys
newbieforever
Posts: 232
Joined: 24 Aug 2016, 03:34

Detecting new content in a browser window

14 Jun 2018, 10:11

On some websites the URL displayed in the address field remains unchanged when new pages of the website are loaded (automatically or by visitor actions).

The browser-window title remains unchanged too on such sites. And such content changes don't generate OnMessage messages.

Is there an easy way to detect such changes?
User avatar
gregster
Posts: 1394
Joined: 30 Sep 2013, 06:48

Re: Detecting new content in a browser window

14 Jun 2018, 10:43

Depends, what you consider easy.
These are probably the most reliable methods, if you also want to extract some data:

Often, if only certain values change (like stock prices), the html source code gets updated via javascript. Just check regularly the relevant parts of the html via IE com, chrome.ahk (by geekdude) or Selenium webdriver (forum member Joe Glines mad an introduction for this).

But your case sounds like you also have multiple frames. That can get messy, as far as I remember. I think, Joe Glines, again, did some stuff about this problem (again using IE COM or Selenium, for example here: http://the-automator.com/web-scraping-w ... 04-frames/).

Edit: Some websites (especially the ones that often update their data) offer also API interfaces, sometimes for free, sometimes not. They are usually ideal to get all the relevant data of a pagen (mostly via JSON strings) - if they exist, it makes sense to look into them. The handling goes from rather easy to awful (the latter usually because of catastrophic docs).
AHKStudent
Posts: 308
Joined: 05 May 2018, 12:23

Re: Detecting new content in a browser window

14 Jun 2018, 11:27

newbieforever wrote:On some websites the URL displayed in the address field remains unchanged when new pages of the website are loaded (automatically or by visitor actions).

The browser-window title remains unchanged too on such sites. And such content changes don't generate OnMessage messages.

Is there an easy way to detect such changes?
"or by visitor actions" what are those actions?
newbieforever
Posts: 232
Joined: 24 Aug 2016, 03:34

Re: Detecting new content in a browser window

14 Jun 2018, 12:15

or by visitor actions" what are those actions?

Clicks on links leading to other pages of the site, e.g.
AHKStudent
Posts: 308
Joined: 05 May 2018, 12:23

Re: Detecting new content in a browser window

14 Jun 2018, 12:23

newbieforever wrote:or by visitor actions" what are those actions?

Clicks on links leading to other pages of the site, e.g.
is there a way for you to detect those clicks?
newbieforever
Posts: 232
Joined: 24 Aug 2016, 03:34

Re: Detecting new content in a browser window

14 Jun 2018, 15:13

Yes, AHKStudent, I am able to use these clicks to associate them with following content changes. But other changes are not initiated by my actions...

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], MannyKSoSo, masok, Rohwedder, roysubs, Scr1pter and 23 guests