[Feature Request] need more fields, want the result can be customized via options
sarike opened this issue · 4 comments
sarike commented
I use this tool to parse rss feed, but there are some fields I need not in the result, such as image
, owner
.
I want two options extraFeedFields
and extraEntryFields
used as function, their return value will be merged into the feed and entry fields. So everyone can custom the result.
const feedData = await read('https://some-rss-feed-xml/', {
extraFeedFields: (channel) {
return {
image: channel['itunes:image'],
owner: channel['iutnes:owner']
}
},
})
result:
{
"title": "xxx",
"link": "xxx",
"description": "xxx",
"language": "",
"generator": "",
"published": "",
"entries": [...],
"image": {...},
"owner": {...},
}
ndaidong commented
@sarike yes, that's smart idea, thank you. I see you forked this repo, are you making a PR for that?
sarike commented
ok, I will have a try.
ndaidong commented
sarike commented
ok