Added encoding string, comments
This commit is contained in:
parent
cdbaa552fb
commit
35c3e11b6e
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-FileCopyrightText: © 2025 A.M. Rowsell <https://frzn.dev/~amr>
|
||||
|
||||
|
@ -44,10 +45,12 @@ def main():
|
|||
now = time.mktime(time.localtime())
|
||||
last_check = app_config["lastupdate"]
|
||||
for hook in app_config["feeds"]:
|
||||
# Get the feed
|
||||
feed = feedparser.parse(hook["url"])
|
||||
published_time = time.mktime(feed.entries[0]["published_parsed"])
|
||||
published_time = published_time + hook["offset"]
|
||||
print(feed.entries[0]["published"], published_time, now)
|
||||
# Generate the webhook
|
||||
webhook = {
|
||||
"embeds": [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue