feat 自动生成默认rss地址

This commit is contained in:
thsrite
2023-09-11 11:39:39 +08:00
parent 1f76dc1e2a
commit 8b243e23ab
2 changed files with 106 additions and 0 deletions

View File

@ -74,3 +74,15 @@ class SiteOper(DbOper):
"cookie": cookies
})
return True, "更新站点Cookie成功"
def update_rss(self, domain: str, rss: str) -> Tuple[bool, str]:
"""
更新站点rss
"""
site = Site.get_by_domain(self._db, domain)
if not site:
return False, "站点不存在"
site.update(self._db, {
"rss": rss
})
return True, "更新站点rss成功"