Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG 🐞] Handling of missing information #4

Open
Bibo-Joshi opened this issue May 26, 2021 · 0 comments
Open

[BUG 🐞] Handling of missing information #4

Bibo-Joshi opened this issue May 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Bibo-Joshi
Copy link

Hi! Nice project you have here, really like it.

Describe the bug
I tried to run it on the rss feed of a tumblr blog and noticed that currently exceptions are raised when the RSS feed doesn't provide some of the info expected by tg-rss. More precisely, for me the following lines raised exceptions:

self.feed_config.etag = raw_feed.etag
self.feed_config.modified = raw_feed.modified

Both lines raise

File "/path/to/venv/lib/python3.8/site-packages/feedparser/util.py", line 158, in __getattr__
    raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'etag/modified'

author=item["author"],

This raises

File "/path/to/venv/lib/python3.8/site-packages/feedparser/util.py", line 113, in __getitem__
    return dict.__getitem__(self, key)
KeyError: 'author'

When I comment the first two lines and hard-code an author, everything works fine so far.

To Reproduce
Steps to reproduce the behavior:

  1. Run tg-rss on https://popsci.tumblr.com/rss

Desktop (please complete the following information):

  • Python Version: 3.8.3
  • tg-rss Version: 0.8.1

Additional context
As a side note, it would be neat if entries with images would be send as picture/media group with a caption. currently the picture is just shown via web page preview. I see that there is some logic for handling images in the code, but it's not used in send_message

@Bibo-Joshi Bibo-Joshi added the bug Something isn't working label May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant