Closed StayPirate closed 2 years ago
I did some test on my own, and it doesn't seem to be that easy. I think I misunderstood what a Json feed is.... It should be something with a fixed structure, and not any random Json file, am I correct? Something like the following example, which I took from jsonfeed.org
{
"version": "https://jsonfeed.org/version/1.1",
"title": "My Example Feed",
"home_page_url": "https://example.org/",
"feed_url": "https://example.org/feed.json",
"items": [
{
"id": "2",
"content_text": "This is a second item.",
"url": "https://example.org/second-item"
},
{
"id": "1",
"content_html": "<p>Hello, world!</p>",
"url": "https://example.org/initial-post"
}
]
}
While I was trying to pass this Json file.
for my use-case, monitoring when a new version of Chrome is released for Linux, probably urlwatch would be a better fit.
Expected behavior
If I try to parse a Json file starting with a [ I want it to be parsed.
Actual behavior
It doesn't parse this feed or the same one with only one element.
Steps to reproduce the behavior
I get the following error
error parsing https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Linux contents: Failed to detect feed type
Note: Please include any links to problem feeds, or the feed content itself!
I think this is due to the following lines: https://github.com/mmcdole/gofeed/blob/68ee9054d97bf13a4ac38f802d2e9c1bcff2991d/detector.go#L74-L78
Maybe something like: (?)