metascraper-iframe 5.55.2 → 5.56.2
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 +3 -3
- package/src/from-twitter.js +4 -5
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-iframe",
|
|
3
3
|
"description": "Metascraper rule to resolve oEmbed iframes for embedding third-party URL representations.",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-iframe",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.56.2",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"author": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"widget"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@metascraper/helpers": "5.
|
|
34
|
+
"@metascraper/helpers": "5.56.2",
|
|
35
35
|
"got": "~11.8.6",
|
|
36
36
|
"lodash": "~4.18.1",
|
|
37
37
|
"oembed-spec": "~1.4.6",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"!test/helpers.js"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "63168a1c6ab9fa67552a13fd9e4a60ad4c10f953"
|
|
62
62
|
}
|
package/src/from-twitter.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const { memoizeOne } = require('@metascraper/helpers')
|
|
3
|
+
const { $meta, memoizeOne } = require('@metascraper/helpers')
|
|
4
4
|
const { map } = require('lodash')
|
|
5
5
|
|
|
6
6
|
const getPlayerUrl = memoizeOne(
|
|
7
|
-
(_, $) => $('
|
|
7
|
+
(_, $) => $meta('twitter:player')($),
|
|
8
8
|
memoizeOne.EqualityUrlAndHtmlDom
|
|
9
9
|
)
|
|
10
10
|
|
|
11
|
-
const playerWidth = $ => $('
|
|
11
|
+
const playerWidth = $ => $meta('twitter:player:width')($)
|
|
12
12
|
|
|
13
|
-
const playerHeight = $ =>
|
|
14
|
-
$('meta[name="twitter:player:height"]').attr('content')
|
|
13
|
+
const playerHeight = $ => $meta('twitter:player:height')($)
|
|
15
14
|
|
|
16
15
|
const fromTwitter =
|
|
17
16
|
() =>
|