开发者

How to poll simple website for updates?

开发者 https://www.devze.com 2023-01-18 00:14 出处:网络
I have a professor who randomly updates his website with homework due tomorrow and seems to expect us to check it every hour.

I have a professor who randomly updates his website with homework due tomorrow and seems to expect us to check it every hour.

This sounds like a job for a program.

His website is simple and entirely html, not even a开发者_运维百科ny javascript. How could I programatically detect any changes/updates to his website?


Check the Last-Modified Response header.


Fetch and md5 the content of each page. Then store and compare with previous values. Note that this is sensitive down to the character level.

Alternativelly, setup a Google Alert for site:your-professors-website.com and have the updates delivered to your email or via rss.


setup a cron job to periodically wget or curl the URL, then grep for relevant text, then send yourself an email if interesting results are found...

0

精彩评论

暂无评论...
验证码 换一张
取 消