Skip to content

Thank you and thoughts #1

@candidexmedia

Description

@candidexmedia

Thank you so much for creating this amazing tool! I've been looking for something like this for the last few years since using Listmonk, and I'm glad that it's something I can use straight out of GitHub, without having to host anything.

I forked the repo and tested the automation with my Listmonk instance hosted on Railway + a test RSS feed generated by the Publii CMS, but ran into some issues:

Background

When I tried to run the Action, I ran into the following error at the "Run RSS Campaign" step:

Image
...
 KeyError: 'published_parsed'
...
    raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'published_parsed'

Attempting a Fix

I'm not a Python expert, so after querying Claude AI, it explained that "The error occurs because some RSS feed entries don't have a published_parsed attribute. The code assumes all entries have this field, but the feed has entries without publication dates."

Indeed, the feed I'm using has an updated attribute rather than published:

Image

Claude suggested the following fix, which I used in my forked repo:

Option 1: Check for the attribute before using it
Find line 85 in listmonk_rss.py and replace it with code that falls back to other date fields or skips entries without dates:

# Around line 85, replace:
if datetime(*entry.published_parsed[:6]) > last_update:

# With:
# Try multiple date fields in order of preference
entry_date = None
if hasattr(entry, 'published_parsed') and entry.published_parsed:
    entry_date = datetime(*entry.published_parsed[:6])
elif hasattr(entry, 'updated_parsed') and entry.updated_parsed:
    entry_date = datetime(*entry.updated_parsed[:6])

# Skip entries without dates or include all if no date found
if entry_date is None or entry_date > last_update:

So I gave that a try, and it worked to generate the draft (yay!):

Image

New errors

But a few things also happened:

  1. I still got an error at the "Run RSS" step:
File "/home/runner/work/listmonk-rss/listmonk-rss/.venv/lib/python3.14/site-packages/httpx/_models.py", line 829, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://api.github.com/repos/candidexmedia/listmonk-rss%20/actions/variables/LAST_UPDATE'
  1. The LAST_UPDATE date wouldn't update, meaning, that the Action keeps generating the same draft when it runs:
Image

I set the variable to 2025-02-07T16:55:54.079370 before the first run because I wasn't sure what to put, and it's stayed the same. Should it be assigned a different value?

Conclusion/tldr

Basically, my questions are:

  1. Is it possible to run this with an RSS feed with entries that contain updated attributes rather than published?
  2. What value should be used as the initial LAST_UPDATE?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions