Socket
Socket
Sign inDemoInstall

@extractus/feed-extractor

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@extractus/feed-extractor - npm Package Compare versions

Comparing version 7.0.2 to 7.0.3

6

package.json
{
"version": "7.0.2",
"version": "7.0.3",
"name": "@extractus/feed-extractor",

@@ -40,4 +40,4 @@ "description": "To read and normalize RSS/ATOM/JSON feed data",

"https-proxy-agent": "^7.0.1",
"jest": "^29.6.2",
"nock": "^13.3.2"
"jest": "^29.6.3",
"nock": "^13.3.3"
},

@@ -44,0 +44,0 @@ "keywords": [

@@ -215,2 +215,19 @@ // main.test

})
test('extract rss feed from medium.com (content:encoded)', async () => {
const url = 'https://medium.com/feed/@ameliakusiak'
const xml = readFileSync('test-data/medium-feed.xml', 'utf8')
const { baseUrl, path } = parseUrl(url)
nock(baseUrl).get(path).reply(200, xml, {
'Content-Type': 'application/xml',
})
const result = await extract(url)
feedAttrs.forEach((k) => {
expect(hasProperty(result, k)).toBe(true)
})
entryAttrs.forEach((k) => {
expect(hasProperty(result.entries[0], k)).toBe(true)
})
expect(validateProps(result.entries[0])).toBe(true)
})
})

@@ -217,0 +234,0 @@

@@ -30,5 +30,7 @@ // parseRssFeed.js

description = '',
'content:encoded': content = '',
} = item
const published = useISODateFormat ? toISODateString(pubDate) : pubDate
const htmlContent = getText(content || description)
const entry = {

@@ -39,3 +41,3 @@ id: getEntryId(guid, link, pubDate),

published,
description: buildDescription(description, descriptionMaxLen),
description: buildDescription(htmlContent || description, descriptionMaxLen),
}

@@ -42,0 +44,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc