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

Parsing error with CDATA in categary tag. #50

Closed
cornelinux opened this issue Sep 18, 2024 · 5 comments
Closed

Parsing error with CDATA in categary tag. #50

cornelinux opened this issue Sep 18, 2024 · 5 comments
Assignees

Comments

@cornelinux
Copy link

Implementing the rss-parser was a breeze and quite simple. Thank you.
I am using version 2.0.0 from PyPI with Python 3.10.12.

However, when I am parsing wordpress blogs, I get an error

channel -> content -> item -> 1 -> content -> category -> content
  str type expected (type=type_error.str)

Which looks like it does not like CDATA in the category. When parsing a feed, where the category tag is a plain str, there is no problem.

@dhvcc
Copy link
Owner

dhvcc commented Sep 19, 2024

Can you provide the sample of those feed so that when I answer I'll be sure that it works for you? Thanks for using the library, hope you like it

@ranma42
Copy link

ranma42 commented Sep 20, 2024

I am hitting the same problem when parsting https://www.ilfattoquotidiano.it/feed/
(older snapshots with the same kind of contents are available on the webarchive: https://web.archive.org/web/20240720105317/https://www.ilfattoquotidiano.it/feed/ )

According to https://validator.w3.org/feed/ it is a valid RSS feed, but it errors out with the same error as @cornelinux

@dhvcc
Copy link
Owner

dhvcc commented Sep 20, 2024

Thanks, I'll take a look and give you a code sample

@dhvcc dhvcc closed this as completed in b4ca468 Sep 26, 2024
@dhvcc
Copy link
Owner

dhvcc commented Sep 26, 2024

Hey, in fact, the spec specified that the category can be a multiple. I've update the code in 2.0.1 version. I'll go ahead and double check every other element for that sort of mistakes
Thanks for pointing this out!

@dhvcc dhvcc self-assigned this Sep 26, 2024
dhvcc added a commit that referenced this issue Sep 26, 2024
@dhvcc
Copy link
Owner

dhvcc commented Sep 26, 2024

I'll rename the version to 2.1.0 since it does change the logic of the library slightly. Should be deployed in 5 minutes

dhvcc added a commit that referenced this issue Sep 26, 2024
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

No branches or pull requests

3 participants