Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex help with Google Page Monitor extension

I'm trying to monitor a small section of a web page for changes using the the Google Page Monitor extension -- https://chrome.google.com/extensions/detail/pemhgklkefakciniebenbfclihhmmfcd

Under advanced settings I can use either Regex or Selectors to accomplish this, but need help with this. In the following html, I'd like to monitor the following for changes in either the URL in line 4 or the text in line 5. Any pointers gratefully accepted.

<div id="rtBtmBox"><div id="sectHead" style="margin-bottom:5px;">
<h3>SLJ's Pick of the Day</h3></div> 
<p align="center">From the&nbsp;March issue</p> 
<p align="center"><a target="_blank" href="http://www.schoollibraryjournal.com/article/CA6723937.html">
<font color="#0000ff"><strong><em>The Summer I Turned Pretty</em></strong><br/>
like image 591
whuffo15 Avatar asked Dec 21 '25 08:12

whuffo15


1 Answers

Awesome, to find a question about my own extension on the front page of StackOverflow.

Anyway, it's easier using a selector. This should do the job: #rtBtmBox p:nth-child(3). However, if that paragraph has more contents, you might need something different (post or link the whole page if so).

A regex that will probably work is: <div id="rtBtmBox">[^]*?<a target="_blank" href="([^"]+)"

like image 80
Max Shawabkeh Avatar answered Dec 23 '25 00:12

Max Shawabkeh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!