@metascraper/helpers 5.55.2 → 5.58.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/index.js +5 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@metascraper/helpers",
|
|
3
3
|
"description": "Shared helper utilities used across metascraper rules for parsing and normalizing metadata.",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-helpers",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.58.4",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -31,28 +31,28 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"audio-extensions": "0.0.0",
|
|
34
|
-
"chrono-node": "~2.10.
|
|
34
|
+
"chrono-node": "~2.10.2",
|
|
35
35
|
"condense-whitespace": "~3.0.0",
|
|
36
|
-
"data-uri-utils": "~1.0.
|
|
37
|
-
"debug-logfmt": "~1.4.
|
|
38
|
-
"entities": "~8.
|
|
36
|
+
"data-uri-utils": "~1.0.15",
|
|
37
|
+
"debug-logfmt": "~1.4.15",
|
|
38
|
+
"entities": "~8.1.0",
|
|
39
39
|
"file-extension": "~4.0.5",
|
|
40
40
|
"has-values": "~2.0.1",
|
|
41
41
|
"image-extensions": "~1.1.0",
|
|
42
|
-
"is-relative-url": "~4.1.
|
|
42
|
+
"is-relative-url": "~4.1.1",
|
|
43
43
|
"is-uri": "~1.2.14",
|
|
44
44
|
"iso-639-3": "~3.0.1",
|
|
45
45
|
"isostring": "0.0.1",
|
|
46
|
-
"jsdom": "~30.
|
|
46
|
+
"jsdom": "~30.1.2",
|
|
47
47
|
"jsonrepair": "~3.15.0",
|
|
48
48
|
"lodash": "~4.18.1",
|
|
49
49
|
"memoize-one": "~6.0.0",
|
|
50
50
|
"microsoft-capitalize": "~1.0.8",
|
|
51
51
|
"mime": "4",
|
|
52
52
|
"normalize-url": "9",
|
|
53
|
-
"re2": "~1.
|
|
53
|
+
"re2": "~1.27.0",
|
|
54
54
|
"smartquotes": "~2.3.2",
|
|
55
|
-
"tldts": "~7.4.
|
|
55
|
+
"tldts": "~7.4.18",
|
|
56
56
|
"url-regex-safe": "~4.0.0",
|
|
57
57
|
"video-extensions": "2"
|
|
58
58
|
},
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "999e1edf52104ca823da226800cb952e0d428f2b"
|
|
77
77
|
}
|
package/src/index.js
CHANGED
|
@@ -556,6 +556,9 @@ const $jsonld = propName => $ => {
|
|
|
556
556
|
return isString(value) ? decodeHTML(value) : value
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
+
const $meta = attr => $ =>
|
|
560
|
+
$(`meta[name="${attr}" i], meta[property="${attr}" i]`).attr('content')
|
|
561
|
+
|
|
559
562
|
const image = (value, opts) => {
|
|
560
563
|
const urlValue = url(value, opts)
|
|
561
564
|
|
|
@@ -729,7 +732,7 @@ const withIframe = (rules, getIframe, propName) => {
|
|
|
729
732
|
}
|
|
730
733
|
}
|
|
731
734
|
|
|
732
|
-
const twitter = $('
|
|
735
|
+
const twitter = $meta('twitter:player')($)
|
|
733
736
|
if (twitter) return probe(twitter, args)
|
|
734
737
|
})
|
|
735
738
|
}
|
|
@@ -737,6 +740,7 @@ const withIframe = (rules, getIframe, propName) => {
|
|
|
737
740
|
module.exports = {
|
|
738
741
|
$filter,
|
|
739
742
|
$jsonld,
|
|
743
|
+
$meta,
|
|
740
744
|
absoluteUrl,
|
|
741
745
|
audio,
|
|
742
746
|
audioExtensions,
|