metascraper-x 5.45.6-2 → 5.45.7
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/LICENSE.md +0 -0
- package/package.json +6 -6
- package/src/index.js +2 -3
package/LICENSE.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-x",
|
|
3
3
|
"description": "Metascraper integration for x.com",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-x",
|
|
5
|
-
"version": "5.45.
|
|
5
|
+
"version": "5.45.7",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"author": {
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"spotify"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@metascraper/helpers": "^5.45.
|
|
28
|
-
"get-urls": "~10.0.1"
|
|
27
|
+
"@metascraper/helpers": "^5.45.7"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"ava": "5"
|
|
@@ -36,8 +35,9 @@
|
|
|
36
35
|
"files": [
|
|
37
36
|
"src"
|
|
38
37
|
],
|
|
39
|
-
"license": "MIT",
|
|
40
38
|
"scripts": {
|
|
41
39
|
"test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
|
|
42
|
-
}
|
|
43
|
-
|
|
40
|
+
},
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"gitHead": "86ed64c8ef626bf651fa58618bb5dfa08d5a9f5a"
|
|
43
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const reachableUrl = require('reachable-url')
|
|
4
|
-
const getUrls = require('get-urls')
|
|
5
|
-
|
|
6
4
|
const {
|
|
5
|
+
getUrls,
|
|
7
6
|
author,
|
|
8
7
|
image,
|
|
9
8
|
memoizeOne,
|
|
@@ -47,7 +46,7 @@ module.exports = ({
|
|
|
47
46
|
let description = $('meta[property="og:description"]').attr('content')
|
|
48
47
|
if (!resolveUrls) return description
|
|
49
48
|
|
|
50
|
-
const urls =
|
|
49
|
+
const urls = getUrls(description)
|
|
51
50
|
|
|
52
51
|
const resolvedUrls = await Promise.all(
|
|
53
52
|
urls.map(async url => {
|