metascraper-amazon 5.29.1 → 5.29.6
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 +11 -8
- package/index.js +2 -2
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> Metascraper integration with Amazon
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br>
|
|
3
|
+
<img style="width: 500px; margin:3rem 0 1.5rem;" src="https://metascraper.js.org/static/logo-banner.png" alt="metascraper">
|
|
4
|
+
<br>
|
|
5
|
+
<br>
|
|
6
|
+
<p align="center"><strong>metascraper-amazon</strong>: Metascraper integration with Amazon.</p>
|
|
7
|
+
<p align="center">See our <a href="https://metascraper.js.org" target='_blank' rel='noopener noreferrer'>website</a> for more information.</p>
|
|
8
|
+
<br>
|
|
9
|
+
</div>
|
|
7
10
|
|
|
8
11
|
## Install
|
|
9
12
|
|
|
@@ -13,7 +16,7 @@ $ npm install metascraper-amazon --save
|
|
|
13
16
|
|
|
14
17
|
## License
|
|
15
18
|
|
|
16
|
-
**metascraper-amazon** © [Microlink](https://microlink.io),
|
|
19
|
+
**metascraper-amazon** © [Microlink](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/metascraper/blob/master/LICENSE.md) License.<br>
|
|
17
20
|
Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/metascraper/contributors).
|
|
18
21
|
|
|
19
|
-
> [microlink.io](https://microlink.io) · GitHub [
|
|
22
|
+
> [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)
|
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const { getPublicSuffix } = require('tldts')
|
|
|
14
14
|
|
|
15
15
|
const REGEX_AMAZON_URL = /https?:\/\/(.*amazon\..*\/.*|.*amzn\..*\/.*|.*a\.co\/.*)/i
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const test = memoizeOne(url => REGEX_AMAZON_URL.test(url))
|
|
18
18
|
|
|
19
19
|
const SUFFIX_LANGUAGES = {
|
|
20
20
|
ca: 'en',
|
|
@@ -58,7 +58,7 @@ module.exports = () => {
|
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
rules.test = ({ url }) =>
|
|
61
|
+
rules.test = ({ url }) => test(url)
|
|
62
62
|
|
|
63
63
|
return rules
|
|
64
64
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "metascraper-amazon",
|
|
3
3
|
"description": "Metascraper integration with Amazon",
|
|
4
4
|
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-amazon",
|
|
5
|
-
"version": "5.29.
|
|
5
|
+
"version": "5.29.6",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -22,14 +22,11 @@
|
|
|
22
22
|
"metascraper"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@metascraper/helpers": "^5.29.
|
|
26
|
-
"tldts": "~5.7.
|
|
25
|
+
"@metascraper/helpers": "^5.29.6",
|
|
26
|
+
"tldts": "~5.7.80"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"
|
|
30
|
-
"mocha": "latest",
|
|
31
|
-
"should": "latest",
|
|
32
|
-
"snap-shot": "latest"
|
|
29
|
+
"ava": "latest"
|
|
33
30
|
},
|
|
34
31
|
"engines": {
|
|
35
32
|
"node": ">= 12"
|
|
@@ -38,8 +35,8 @@
|
|
|
38
35
|
"index.js"
|
|
39
36
|
],
|
|
40
37
|
"scripts": {
|
|
41
|
-
"test": "NODE_PATH=.. TZ=UTC
|
|
38
|
+
"test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
|
|
42
39
|
},
|
|
43
40
|
"license": "MIT",
|
|
44
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b05f3948ac8878aedee0cb21f3024779c78b6bf4"
|
|
45
42
|
}
|