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

Failed to detect feed type on https://storyfm.cn/feed/episodes #170

Closed
gozelus opened this issue Feb 18, 2021 · 3 comments
Closed

Failed to detect feed type on https://storyfm.cn/feed/episodes #170

gozelus opened this issue Feb 18, 2021 · 3 comments

Comments

@gozelus
Copy link

gozelus commented Feb 18, 2021

resp, _ := http.Get("https://storyfm.cn/feed/episodes")
t := gofeed.DetectFeedType(resp.Body)
fmt.Println(t)

Expected behavior

it prints 0

Actual behavior

should print FeedTypeRSS


gofeed.NewParser().ParseURL("https://storyfm.cn/feed/episodes")

return error, but

resp, _ := http.Get("https://storyfm.cn/feed/episodes")
f, err := rss.Parser{}.Parse(resp.Body)

works fine.

@gozelus
Copy link
Author

gozelus commented Feb 23, 2021

I have found the reason, the HTML file contains the bom lead to parse failure.
Is it possible to solve this problem?

@makew0rld
Copy link
Contributor

I believe the master branch has a fix for this, see #158 and d5ae839.

@gozelus
Copy link
Author

gozelus commented Mar 3, 2021

I have found the reason, the HTML file contains the bom lead to parse failure.
Is it possible to solve this problem?

It fixed, thanks so much !

@gozelus gozelus closed this as completed Mar 3, 2021
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

2 participants