html-get 2.11.2 → 2.11.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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "html-get",
3
3
  "description": "Get the HTML from any website, using prerendering when is necessary.",
4
4
  "homepage": "https://nicedoc.com/microlinkhq/html-get",
5
- "version": "2.11.2",
5
+ "version": "2.11.4",
6
6
  "main": "src/index.js",
7
7
  "bin": {
8
8
  "html-get": "bin/index.js"
@@ -50,6 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@commitlint/cli": "latest",
52
52
  "@commitlint/config-conventional": "latest",
53
+ "@ksmithut/prettier-standard": "latest",
53
54
  "ava": "latest",
54
55
  "browserless": "latest",
55
56
  "c8": "latest",
@@ -59,7 +60,6 @@
59
60
  "git-authors-cli": "latest",
60
61
  "nano-staged": "latest",
61
62
  "npm-check-updates": "latest",
62
- "prettier-standard": "latest",
63
63
  "pretty": "latest",
64
64
  "puppeteer": "latest",
65
65
  "regex-iso-date": "latest",
@@ -2,31 +2,31 @@
2
2
  [
3
3
  [
4
4
  "domainWithoutSuffix",
5
- "youtube"
5
+ "google"
6
6
  ]
7
7
  ],
8
8
  [
9
9
  [
10
10
  "domainWithoutSuffix",
11
- "google"
11
+ "youtube"
12
12
  ]
13
13
  ],
14
14
  [
15
15
  [
16
16
  "domainWithoutSuffix",
17
- "wordpress"
17
+ "apple"
18
18
  ]
19
19
  ],
20
20
  [
21
21
  [
22
22
  "domainWithoutSuffix",
23
- "apple"
23
+ "microsoft"
24
24
  ]
25
25
  ],
26
26
  [
27
27
  [
28
28
  "domainWithoutSuffix",
29
- "microsoft"
29
+ "wordpress"
30
30
  ]
31
31
  ],
32
32
  [
@@ -56,13 +56,13 @@
56
56
  [
57
57
  [
58
58
  "domainWithoutSuffix",
59
- "imdb"
59
+ "bbc"
60
60
  ]
61
61
  ],
62
62
  [
63
63
  [
64
64
  "domainWithoutSuffix",
65
- "theguardian"
65
+ "slideshare"
66
66
  ]
67
67
  ],
68
68
  [
@@ -74,13 +74,13 @@
74
74
  [
75
75
  [
76
76
  "domainWithoutSuffix",
77
- "bbc"
77
+ "theguardian"
78
78
  ]
79
79
  ],
80
80
  [
81
81
  [
82
82
  "domainWithoutSuffix",
83
- "slideshare"
83
+ "imdb"
84
84
  ]
85
85
  ],
86
86
  [
@@ -92,7 +92,7 @@
92
92
  [
93
93
  [
94
94
  "domainWithoutSuffix",
95
- "huffingtonpost"
95
+ "telegraph"
96
96
  ]
97
97
  ],
98
98
  [
@@ -110,25 +110,31 @@
110
110
  [
111
111
  [
112
112
  "domainWithoutSuffix",
113
- "telegraph"
113
+ "huffingtonpost"
114
114
  ]
115
115
  ],
116
116
  [
117
117
  [
118
118
  "domainWithoutSuffix",
119
- "yelp"
119
+ "engadget"
120
+ ]
121
+ ],
122
+ [
123
+ [
124
+ "domain",
125
+ "abc.net.au"
120
126
  ]
121
127
  ],
122
128
  [
123
129
  [
124
130
  "domainWithoutSuffix",
125
- "eventbrite"
131
+ "yelp"
126
132
  ]
127
133
  ],
128
134
  [
129
135
  [
130
- "domain",
131
- "abc.net.au"
136
+ "domainWithoutSuffix",
137
+ "eventbrite"
132
138
  ]
133
139
  ],
134
140
  [
@@ -152,13 +158,13 @@
152
158
  [
153
159
  [
154
160
  "domainWithoutSuffix",
155
- "engadget"
161
+ "giphy"
156
162
  ]
157
163
  ],
158
164
  [
159
165
  [
160
166
  "domainWithoutSuffix",
161
- "digg"
167
+ "etsy"
162
168
  ]
163
169
  ],
164
170
  [
@@ -176,13 +182,13 @@
176
182
  [
177
183
  [
178
184
  "domainWithoutSuffix",
179
- "dribbble"
185
+ "digg"
180
186
  ]
181
187
  ],
182
188
  [
183
189
  [
184
190
  "domainWithoutSuffix",
185
- "etsy"
191
+ "dribbble"
186
192
  ]
187
193
  ],
188
194
  [
@@ -197,12 +203,6 @@
197
203
  "ghost"
198
204
  ]
199
205
  ],
200
- [
201
- [
202
- "domainWithoutSuffix",
203
- "giphy"
204
- ]
205
- ],
206
206
  [
207
207
  [
208
208
  "domainWithoutSuffix",
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ const autoDomains = require('./auto-domains')
12
12
  const addHtml = require('./html')
13
13
 
14
14
  const REQ_TIMEOUT = 8000
15
+ const ABORT_TYPES = ['image', 'stylesheet', 'font']
15
16
 
16
17
  const fetch = PCancelable.fn(
17
18
  async (
@@ -68,7 +69,7 @@ const prerender = PCancelable.fn(
68
69
  headers,
69
70
  gotOpts,
70
71
  timeout = REQ_TIMEOUT,
71
- abortTypes = ['image', 'stylesheet', 'font'],
72
+ abortTypes = ABORT_TYPES,
72
73
  ...opts
73
74
  },
74
75
  onCancel
@@ -214,4 +215,5 @@ module.exports = PCancelable.fn(
214
215
  )
215
216
 
216
217
  module.exports.REQ_TIMEOUT = REQ_TIMEOUT
218
+ module.exports.ABORT_TYPES = ABORT_TYPES
217
219
  module.exports.isFetchMode = isFetchMode