rsstail.py icon indicating copy to clipboard operation
rsstail.py copied to clipboard

-w --newer switch using proper date syntax causes crash

Open ghost opened this issue 3 years ago • 4 comments

rsstail -dl -U -a -s -n 1 -w "2021/03/20 13:00:00" -u https://feed.com/rss !

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/feedparser/util.py", line 156, in __getattr__
    return self.__getitem__(key)
  File "/usr/local/lib/python3.7/dist-packages/feedparser/util.py", line 113, in __getitem__
    return dict.__getitem__(self, key)
KeyError: 'date_parsed'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/rsstail/main.py", line 433, in main
    tick(feeds, opts, formatter, seen_id_hashes, iteration)
  File "/usr/local/lib/python3.7/dist-packages/rsstail/main.py", line 343, in tick
    entries = [entry for entry in entries if entry.date_parsed > opts.newer]
  File "/usr/local/lib/python3.7/dist-packages/rsstail/main.py", line 343, in <listcomp>
    entries = [entry for entry in entries if entry.date_parsed > opts.newer]
  File "/usr/local/lib/python3.7/dist-packages/feedparser/util.py", line 158, in __getattr__
    raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'date_parsed'

Also, seems that if I do not want it to initially print anything, -n 0 should allow for that but after a few moments it prints the articles anyway.

ghost avatar Mar 20 '21 14:03 ghost