LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-03-2011, 06:09 PM   #1
dog68
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Monitoring for a change in a web page


Hi,

I'm trying to write some bash script to monitor for a change in web pages.

I'm using WGET (through a cronjob) to collect the pages, then use DIFF to compare the previous and current page for changes, then just sending a notification to indicate if a change is detected.

This was all working great in the simple test environment until I tried monitoring a page that had a dynamic link . Where nearly every test brought up a difference.

So to my question, is there a way to do a DIFF on a couple of web pages but configure it to exclude dynamic links?

Thanks,

dog.
 
Old 04-04-2011, 02:52 AM   #2
norbert74
Member
 
Registered: Apr 2006
Posts: 63

Rep: Reputation: 23
Well, if there is a way to identify the dynamic links then you could download the page, remove the links with sed and then make the diff or even remove all links generally before the diff.
This would remove all links:
Code:
sed -i -e 's/<a href=".*">.*<\/a>/<a href=""><\/a>/' ./test.html
 
Old 04-04-2011, 08:33 PM   #3
dog68
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks heaps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 9 02-28-2015 12:07 AM
change the font colors of lines in a web page lothario Linux - Software 6 05-03-2010 11:18 PM
Change user password from web page goossen Linux - Server 6 07-31-2008 07:37 AM
Self Refreshing Web Page for Status Monitoring markjuggles General 7 05-19-2008 12:57 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration