Skip to content

Commit

Permalink
Improve feed items resolver
Browse files Browse the repository at this point in the history
Signed-off-by: m4rc3l05 <[email protected]>
  • Loading branch information
M4RC3L05 committed May 13, 2024
1 parent 1f2a141 commit 490ecd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions deno.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"jsr:@std/[email protected]": "jsr:@std/[email protected]",
"npm:@mozilla/[email protected]": "npm:@mozilla/[email protected]",
"npm:@types/node": "npm:@types/[email protected]",
"npm:@vinejs/[email protected]": "npm:@vinejs/[email protected]",
"npm:[email protected]": "npm:[email protected]",
"npm:[email protected]": "npm:[email protected]",
Expand Down Expand Up @@ -165,6 +166,10 @@
"integrity": "sha512-xhhEcEvhQC8mP5oOr5hbE4CmUgmw/IPV1jhpGg2xSkzoFrt9i8YVqBQt9744EFesi5F7pBheWozg63RUBM/5JA==",
"dependencies": {}
},
"@types/[email protected]": {
"integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==",
"dependencies": {}
},
"@types/[email protected]": {
"integrity": "sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg==",
"dependencies": {}
Expand Down
9 changes: 2 additions & 7 deletions src/resolvers/feed-resolver/xml-feed-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ export class XMLFeedResolver implements FeedResolver {
}

resolveFeedItems(feed: Record<string, unknown>) {
const searchKeys = [
"channel.item",
"channel.items",
"item",
"items",
"entry",
];
// rss or atom or rdf
const searchKeys = ["item", "entry", "channel.item"];

return (_.chain(searchKeys)
.map((k) =>
Expand Down

0 comments on commit 490ecd1

Please sign in to comment.