Skip to content

Commit

Permalink
Update enclosure
Browse files Browse the repository at this point in the history
  • Loading branch information
versun authored Apr 24, 2024
1 parent 1684d76 commit 526a4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/feed_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ def generate_atom_feed(feed_url: str, feed_dict: dict):
fe.pubDate(pubdate)
fe.summary(summary, type='html')

if entry.get('enclosures'):
enclosure = entry.get('enclosures')[0]
for enclosure in entry.get('enclosures', []):
fe.enclosure(url=enclosure.get('href'),
type=enclosure.get('type'),
length=enclosure.get('length'),
)

# id, title, updated are required
if not fe.updated():
fe.updated(pubdate if pubdate else datetime.now(timezone.utc))
Expand Down

0 comments on commit 526a4de

Please sign in to comment.