diff --git a/package.json b/package.json index d414838..550a2d0 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "7.0.3", + "version": "7.0.4", "name": "@extractus/feed-extractor", "description": "To read and normalize RSS/ATOM/JSON feed data", "homepage": "https://extractor-demos.pages.dev", diff --git a/src/utils/parseAtomFeed.js b/src/utils/parseAtomFeed.js index 51c0a06..7b14fe4 100644 --- a/src/utils/parseAtomFeed.js +++ b/src/utils/parseAtomFeed.js @@ -34,13 +34,13 @@ const transform = (item, options) => { } = item const pubDate = updated || modified || published || issued - const htmlContent = getText(content || summary) + const htmlContent = getText(summary || content) const entry = { id: getEntryId(id, link, pubDate), title: getText(title), link: getPureUrl(link, id, baseUrl), published: useISODateFormat ? toISODateString(pubDate) : pubDate, - description: buildDescription(htmlContent || summary, descriptionMaxLen), + description: buildDescription(summary || htmlContent, descriptionMaxLen), } const extraFields = getExtraEntryFields(item) diff --git a/src/utils/parseRssFeed.js b/src/utils/parseRssFeed.js index 9d264db..ac7892c 100644 --- a/src/utils/parseRssFeed.js +++ b/src/utils/parseRssFeed.js @@ -31,13 +31,13 @@ const transform = (item, options) => { } = item const published = useISODateFormat ? toISODateString(pubDate) : pubDate - const htmlContent = getText(content || description) + const htmlContent = getText(description || content) const entry = { id: getEntryId(guid, link, pubDate), title: getText(title), link: getPureUrl(link, guid, baseUrl), published, - description: buildDescription(htmlContent || description, descriptionMaxLen), + description: buildDescription(description || htmlContent, descriptionMaxLen), } const extraFields = getExtraEntryFields(item)