metascraper-video 5.45.10 → 5.45.25
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/README.md +1 -1
- package/package.json +3 -3
- package/src/index.js +5 -4
package/README.md
CHANGED
|
@@ -37,4 +37,4 @@ Any option provided here will passed to [@keyvhq/memoize#options](https://github
|
|
|
37
37
|
**metascraper-video** © [Microlink](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/metascraper/blob/master/LICENSE.md) License.<br>
|
|
38
38
|
Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/metascraper/contributors).
|
|
39
39
|
|
|
40
|
-
> [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) ·
|
|
40
|
+
> [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · X [@microlinkhq](https://x.com/microlinkhq)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-video",
|
|
3
3
|
"description": "Get video property from HTML markup",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-video",
|
|
5
|
-
"version": "5.45.
|
|
5
|
+
"version": "5.45.25",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"author": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"video"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@metascraper/helpers": "^5.45.
|
|
26
|
+
"@metascraper/helpers": "^5.45.25",
|
|
27
27
|
"lodash": "~4.17.21",
|
|
28
28
|
"p-reflect": "~2.1.0"
|
|
29
29
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"!test/helpers.js"
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "50363a681cb279e659c1b4ee6d30319d9d9c297f"
|
|
51
51
|
}
|
package/src/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
4
|
$jsonld,
|
|
5
|
-
$twitter,
|
|
6
5
|
findRule,
|
|
7
6
|
has,
|
|
8
7
|
loadIframe,
|
|
@@ -58,11 +57,13 @@ const videoRules = [
|
|
|
58
57
|
: undefined
|
|
59
58
|
},
|
|
60
59
|
({ url, htmlDom: $ }) => {
|
|
61
|
-
const src = $
|
|
60
|
+
const src = $('meta[name="twitter:player:stream"]').attr('content')
|
|
62
61
|
return src
|
|
63
62
|
? video(src, {
|
|
64
63
|
url,
|
|
65
|
-
type: $
|
|
64
|
+
type: $('meta[name="twitter:player:stream:content_type"]').attr(
|
|
65
|
+
'content'
|
|
66
|
+
)
|
|
66
67
|
})
|
|
67
68
|
: undefined
|
|
68
69
|
},
|
|
@@ -98,7 +99,7 @@ const withIframe = (rules, getIframe) =>
|
|
|
98
99
|
).then(({ value }) => value)
|
|
99
100
|
},
|
|
100
101
|
async ({ htmlDom: $, url }) => {
|
|
101
|
-
const src = $
|
|
102
|
+
const src = $('meta[name="twitter:player"]').attr('content')
|
|
102
103
|
return src
|
|
103
104
|
? findRule(rules, {
|
|
104
105
|
htmlDom: await getIframe(url, $, { src }),
|