如何轮询简单网站的更新?

发布于 2024-09-24 19:35:40 字数 142 浏览 1 评论 0原文

我有一位教授,他随机更新他的网站,其中包含明天到期的作业,并且似乎希望我们每小时检查一次。

这听起来像是一个程序的工作。

他的网站很简单,完全是 html,甚至没有任何 javascript。我如何以编程方式检测他的网站的任何更改/更新?

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 any javascript. How could I programatically detect any changes/updates to his website?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

老旧海报 2024-10-01 19:35:40

检查 Last-Modified 响应标头。

Check the Last-Modified Response header.

远昼 2024-10-01 19:35:40

获取并 md5 每个页面的内容。然后存储并与以前的值进行比较。请注意,这对于字符级别来说是敏感的。

或者,为 site:your-professors-website.com 设置 Google 快讯并将更新发送到您的电子邮件或通过 rss。

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.

情丝乱 2024-10-01 19:35:40

设置一个 cron 作业来定期 wget 或curl URL,然后 grep 查找相关文本,如果发现有趣的结果,则给自己发送一封电子邮件...

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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文