I need to make a script that will notify me when a change is made to a website. I am not sure about the best way to go about this and I don't know what python has that will be useful. Any push in the right direction would be helpful.
Asked
Active
Viewed 2,253 times
3
-
is this your website or someone elses? – dm03514 Sep 27 '11 at 13:04
2 Answers
4
You may use the last-modified date of the remote page :
import urllib
u = urllib.urlopen("http://www.google.com")
u.info().get("last-modified")

JC Plessis
- 683
- 3
- 7
1
It all depends on what you define as an update to a website.
The simplest solution would be to use urllib2 to get the contents of the given website, storing it in a variable then quering the website again for contents and comparing them.
Have that running in an infinite loop and you are set.

Grim
- 937
- 10
- 24