Brand New Here, figured I'd ask the experts

I’m trying to get an extension for google chrome. Basically I need it to refresh the page until it finds a keyword, and clicks it. Thats it. The closest thing I found was auto refresher plus which will refresh the page and has an option to look for a keyword which triggers the extension to stop refreshing; also displays a pop up. Is it easy enough to modify that extension to click the keyword also? Any help would be appreciated, <snip/> Thanks!

Does this need to be an “in browser” solution? Or would browser automation also be acceptable?

Doesnt really matter, just needs to do those 2 things. Speed is ideal, but as long as it’s faster then a human could see and click, it would be perfect.

Do you have control of the page you wish to refresh?

Could you expand a little on what you are trying to do?

I’d like a way to detect restocks on apparel items or different things on a website that was out of stock before. I’d prefer to have it just going on in a tab on my chrome. So while I watch tv or something, it would continue to look for the keyword and click any link that is associated with it.

Well, if I understand correctly, you dont need the browser at all. You just need a script that periodically fetches a web page from a server and then scans the response for certain textual elements, ie stock quantities, on a web page. Kind of a web scraping exercise. This sounds like the kind of thing that would work well as a cron job. Am I on the right track?

I should have added that the cron job could then email you when it finds the item on the restock list. Is that what you’re after?

Appreciate the reply, Looking for something a little more immediate, here is an example. Basically a site like

http://www.gap.com/browse/category.do?cid=11900

would need to be refreshed until an item popped up that had a certain keyword in the link that is below the picture. The link would need to be clicked as soon as it is detected. If this is something that is really difficult I apologize.

You may want to contact the site before you get too deep into things.

Site Contents

The Sites and the Contents are intended solely for personal, non-commercial use. You may download or copy the Contents and other downloadable materials displayed on the Sites for your personal use only. No right, title or interest in any downloaded Content is transferred to you as a result of any such downloading or copying. You may not reproduce (except as noted above), publish, transmit, distribute, display, modify, create derivative works from, sell or exploit in any way any of the Contents or the Sites.

I think it will be easier if they provide a Rest API. Might be worth checking to see if they provide that kind of service.

If its only legal to do it within a browser you may be able to use Selenium. (Not that I think thats clear from the terms and conditions I saw earlier in the thread but then I’m not a lawyer.)

Aw I had no idea this was against any rules, it seems honest in principle.

Maybe I’m missing something, but couldn’t you use a user script to do this?

It would go:

  • Search page for keyword
  • If present click link
  • Else wait 1 minute
  • Reload page and repeat

I don’t think that would be against their terms and conditions either.

Any recommendation on scripting software?

Yup, Chrome and TamperMonkey.
I wrote a couple of blog [URL=“http://hibbard.eu/tampermonkey-tutorial-2/”]posts on using TamperMonkey. Maybe they’ll be of some use.