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

Castero doesn't consider Youtube feeds as valid rss #107

Open
taziden opened this issue Mar 27, 2020 · 3 comments · May be fixed by #206
Open

Castero doesn't consider Youtube feeds as valid rss #107

taziden opened this issue Mar 27, 2020 · 3 comments · May be fixed by #206

Comments

@taziden
Copy link

taziden commented Mar 27, 2020

Hi,
I'm not sure if this is an issue per se but I'm trying to import a youtube channel rss feed into castero and I encounter the following traceback:

Traceback (most recent call last):
  File "/home/taziden/.local/bin/castero", line 5, in <module>
    from castero.__main__ import main
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/__main__.py", line 159, in <module>
    main()
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/__main__.py", line 92, in main
    import_subscriptions(vars(args)['import'], database)
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/__main__.py", line 27, in import_subscriptions
    for generated in subscriptions.parse():
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/subscriptions.py", line 136, in parse
    feed = Feed(url=entry.attrib['xmlUrl'])
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/feed.py", line 83, in __init__
    self._validate_feed()
  File "/home/taziden/.local/pipx/venvs/castero/lib/python3.8/site-packages/castero/feed.py", line 179, in _validate_feed
    raise FeedStructureError("XML document is not an RSS feed")
castero.feed.FeedStructureError: XML document is not an RSS feed

Example feed: https://www.youtube.com/feeds/videos.xml?channel_id=UCSULDz1yaHLVQWHpm4g_GHA

@xgi
Copy link
Owner

xgi commented Mar 27, 2020

I looked into the structure of those youtube feeds and it's definitely not RSS, so this isn't an issue with the parser. Theoretically it's not too different, but adding support for this format specifically would require rewriting quite a bit of code since there are many (imo reasonable) assumptions that feeds are valid RSS. This is something I might add in the future, but I don't think I'll plan on doing it at the moment.

@Inrin
Copy link

Inrin commented Dec 6, 2020

It's not RSS but an Atom-Feed.
You may use python-feedparser, to read RSS and Atom feeds.

@tyjak
Copy link

tyjak commented Dec 3, 2022

Would be very nice to have ATOM feed support :)

@adamm-xyz adamm-xyz linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants