-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from extractus/v6.1.8
v6.1.8
- Loading branch information
Showing
13 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@extractus/feed-extractor", | ||
"version": "6.1.7", | ||
"version": "6.1.8", | ||
"main": "./feed-extractor.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// @extractus/[email protected].7, by @extractus - built with esbuild at 2022-12-06T05:40:03.694Z - published under MIT license | ||
// @extractus/[email protected].8, by @extractus - built with esbuild at 2022-12-30T05:55:09.972Z - published under MIT license | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
|
@@ -1885,7 +1885,7 @@ var profetch = async (url, proxy = {}) => { | |
var retrieve_default = async (url, options = {}) => { | ||
const { | ||
headers = { | ||
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0" | ||
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0" | ||
}, | ||
proxy = null | ||
} = options; | ||
|
@@ -2015,6 +2015,10 @@ var getPureUrl = (url, id = "") => { | |
const link = getLink(url, id); | ||
return link ? purify(link) : ""; | ||
}; | ||
var hash = (str) => Math.abs(str.split("").reduce((s, c) => Math.imul(31, s) + c.charCodeAt(0) | 0, 0)).toString(36); | ||
var getEntryId = (id, url, pubDate) => { | ||
return id ? getText(id) : hash(getPureUrl(url)) + "-" + new Date(pubDate).getTime(); | ||
}; | ||
var getEnclosure = (val) => { | ||
const url = hasProperty(val, "@_url") ? val["@_url"] : ""; | ||
const type = hasProperty(val, "@_type") ? val["@_type"] : ""; | ||
|
@@ -2055,6 +2059,7 @@ var transform = (item, options) => { | |
getExtraEntryFields | ||
} = options; | ||
const { | ||
id = "", | ||
title = "", | ||
url: link = "", | ||
date_published: pubDate = "", | ||
|
@@ -2065,6 +2070,7 @@ var transform = (item, options) => { | |
const published = useISODateFormat ? toISODateString(pubDate) : pubDate; | ||
const extraFields = getExtraEntryFields(item); | ||
const entry = { | ||
id: getEntryId(id, link, pubDate), | ||
title, | ||
link: purify(link), | ||
published, | ||
|
@@ -2117,13 +2123,15 @@ var transform2 = (item, options) => { | |
getExtraEntryFields | ||
} = options; | ||
const { | ||
guid = "", | ||
title = "", | ||
link = "", | ||
pubDate = "", | ||
description = "" | ||
} = item; | ||
const published = useISODateFormat ? toISODateString(pubDate) : pubDate; | ||
const entry = { | ||
id: getEntryId(guid, link, pubDate), | ||
title: getText(title), | ||
link: getPureUrl(link), | ||
published, | ||
|
@@ -2231,6 +2239,7 @@ var transform3 = (item, options) => { | |
const pubDate = updated || published; | ||
const htmlContent = getText(content || summary); | ||
const entry = { | ||
id: getEntryId(id, link, pubDate), | ||
title: getText(title), | ||
link: getPureUrl(link, id), | ||
published: useISODateFormat ? toISODateString(pubDate) : pubDate, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters