Closed stobb3s closed 3 years ago
Huuh, strange. Starting xml files with <?xml
is standard since 1999. Don't you think that the problem is the service that provides this file?
Does xmltodict
reads that document w/o <?xml
?
Does xmltodict reads that document w/o <?xml?
Yes, when I changed the code to the above, it read just fine.
Starting xml files with <?xml is standard since 1999. Don't you think that the problem is the service that provides this file?
According the RSS spec, all RSS files must conform to the XML 1.0 spec. And according to that spec, all XML files must include processing instructions. So yes, this particular file does not conform to the spec.
Since you are the developer, it's your decision whether or not to support an out-of-spec file. But this feed opens with no issues in gPodder and AntennaPod.
Ok, let me known the answer according the encoding issue, especially if there is no further need for it.
According the xml thing, I changed it as follows:
if not res.startswith("<?xml") and not res.startswith("<rss"):
BTW: It is within a git submodule that is used by all my podcast addons.
Ok. The latest update plugin.audio.podcasts.2.2.1-pre2.zip
fixed the issue for me. Thanks for your support.
I have a podcast feed that won't open, and the error message says "Unexpected Content". The URL is here. After inspecting the code, the part that fails is:
If you open the URL, you can see that the first element is
<rss>
, not<?xml>
. It appears this feed does not include the xml processing instruction and immediately starts with<rss>
. You may want to take this possibility into account in your code. For example, I changed it to the following, and it fixed the issue: