【发布时间】:2020-08-01 17:52:58
【问题描述】:
我如何命令 Django App 每天检查文件(在链接中)并在满足某些条件时下载它。假设,在伪代码中:
every 24h
access link
if filename differs from the name of the existing file (e.g. previously downloaded) OR there's no such a file
download file
else skip
我很乐意提供最简单的解决方案。也许是教程? 谢谢!
PS 我希望将它实现到 django 应用中,所以请不要建议使用 cron
【问题讨论】:
-
两个答案都很好并且有效。另一个非常相似的选项是 python-rq(.org),可能通过 django-rq。
标签: python python-3.x django web web-scraping