html-get 2.21.3 → 2.22.0-1
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 +0 -0
- package/package.json +14 -17
- package/scripts/postinstall +0 -0
- package/src/auto-domains.json +1 -1
- package/src/index.js +8 -3
package/LICENSE
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "html-get",
|
|
3
3
|
"description": "Get the HTML from any website, fine-tuned for correction & speed",
|
|
4
4
|
"homepage": "https://nicedoc.com/microlinkhq/html-get",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.22.0-1",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"html-get": "bin/index.js"
|
|
@@ -82,18 +82,6 @@
|
|
|
82
82
|
"scripts",
|
|
83
83
|
"src"
|
|
84
84
|
],
|
|
85
|
-
"scripts": {
|
|
86
|
-
"clean": "rm -rf node_modules",
|
|
87
|
-
"contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
88
|
-
"lint": "standard",
|
|
89
|
-
"postinstall": "node scripts/postinstall",
|
|
90
|
-
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
|
|
91
|
-
"pretest": "npm run lint",
|
|
92
|
-
"release": "standard-version -a",
|
|
93
|
-
"release:github": "github-generate-release",
|
|
94
|
-
"release:tags": "git push --follow-tags origin HEAD:master",
|
|
95
|
-
"test": "c8 ava"
|
|
96
|
-
},
|
|
97
85
|
"license": "MIT",
|
|
98
86
|
"ava": {
|
|
99
87
|
"files": [
|
|
@@ -122,11 +110,20 @@
|
|
|
122
110
|
"finepack"
|
|
123
111
|
]
|
|
124
112
|
},
|
|
125
|
-
"pnpm": {
|
|
126
|
-
"neverBuiltDependencies": []
|
|
127
|
-
},
|
|
128
113
|
"simple-git-hooks": {
|
|
129
114
|
"commit-msg": "npx commitlint --edit",
|
|
130
115
|
"pre-commit": "npx nano-staged"
|
|
116
|
+
},
|
|
117
|
+
"scripts": {
|
|
118
|
+
"clean": "rm -rf node_modules",
|
|
119
|
+
"contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
120
|
+
"lint": "standard",
|
|
121
|
+
"postinstall": "node scripts/postinstall",
|
|
122
|
+
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
|
|
123
|
+
"pretest": "npm run lint",
|
|
124
|
+
"release": "standard-version -a",
|
|
125
|
+
"release:github": "github-generate-release",
|
|
126
|
+
"release:tags": "git push --follow-tags origin HEAD:master",
|
|
127
|
+
"test": "c8 ava"
|
|
131
128
|
}
|
|
132
|
-
}
|
|
129
|
+
}
|
package/scripts/postinstall
CHANGED
|
File without changes
|
package/src/auto-domains.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[[["domainWithoutSuffix","google"]],[["domainWithoutSuffix","youtube"]],[["domainWithoutSuffix","wordpress"]],[["domainWithoutSuffix","apple"]],[["domainWithoutSuffix","microsoft"]],[["domainWithoutSuffix","wikipedia"]],[["domainWithoutSuffix","
|
|
1
|
+
[[["domainWithoutSuffix","google"]],[["domainWithoutSuffix","youtube"]],[["domainWithoutSuffix","wordpress"]],[["domainWithoutSuffix","apple"]],[["domainWithoutSuffix","microsoft"]],[["domainWithoutSuffix","wikipedia"]],[["domainWithoutSuffix","vimeo"]],[["domainWithoutSuffix","blogspot"]],[["domainWithoutSuffix","github"]],[["domain","x.com"]],[["domainWithoutSuffix","nytimes"]],[["domainWithoutSuffix","theguardian"]],[["domainWithoutSuffix","twitter"]],[["domainWithoutSuffix","bbc"]],[["domainWithoutSuffix","imdb"]],[["domainWithoutSuffix","slideshare"]],[["domainWithoutSuffix","telegraph"]],[["domainWithoutSuffix","pinterest"]],[["domainWithoutSuffix","spotify"]],[["domainWithoutSuffix","huffingtonpost"]],[["domainWithoutSuffix","instagram"]],[["domainWithoutSuffix","techcrunch"]],[["domainWithoutSuffix","zoom"]],[["domain","abc.net.au"]],[["domainWithoutSuffix","arxiv"]],[["domainWithoutSuffix","yelp"]],[["domainWithoutSuffix","eventbrite"]],[["domainWithoutSuffix","engadget"]],[["domainWithoutSuffix","soundcloud"]],[["domainWithoutSuffix","theverge"]],[["domainWithoutSuffix","digg"]],[["domainWithoutSuffix","imgur"]],[["domainWithoutSuffix","csdn"]],[["domainWithoutSuffix","deviantart"]],[["domainWithoutSuffix","dribbble"]],[["domainWithoutSuffix","etsy"]],[["domainWithoutSuffix","flickr"]],[["domainWithoutSuffix","ghost"]],[["domainWithoutSuffix","giphy"]],[["domainWithoutSuffix","gitlab"]],[["domainWithoutSuffix","meetup"]],[["domainWithoutSuffix","producthunt"]],[["domainWithoutSuffix","reddit"]],[["domainWithoutSuffix","sourceforge"]],[["domainWithoutSuffix","stackoverflow"]],[["domainWithoutSuffix","substack"]],[["domainWithoutSuffix","tumblr"]],[["domainWithoutSuffix","ycombinator"]]]
|
package/src/index.js
CHANGED
|
@@ -139,9 +139,10 @@ const prerender = PCancelable.fn(
|
|
|
139
139
|
async (page, response) => {
|
|
140
140
|
if (!response) throw new AbortError('empty response')
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
const duration = debug.duration('payload')
|
|
143
|
+
const payload = {
|
|
143
144
|
headers: response.headers(),
|
|
144
|
-
html: await page.content(),
|
|
145
|
+
html: await page.content('html'),
|
|
145
146
|
mode: 'prerender',
|
|
146
147
|
url: response.url(),
|
|
147
148
|
statusCode: response.status(),
|
|
@@ -153,6 +154,9 @@ const prerender = PCancelable.fn(
|
|
|
153
154
|
url: req.url()
|
|
154
155
|
}))
|
|
155
156
|
}
|
|
157
|
+
|
|
158
|
+
duration()
|
|
159
|
+
return payload
|
|
156
160
|
},
|
|
157
161
|
{
|
|
158
162
|
timeout,
|
|
@@ -161,9 +165,10 @@ const prerender = PCancelable.fn(
|
|
|
161
165
|
}
|
|
162
166
|
)
|
|
163
167
|
|
|
168
|
+
const duration = debug.duration('prerender')
|
|
164
169
|
const payload = await getPayload(url, opts)
|
|
165
170
|
await fetchRes.cancel()
|
|
166
|
-
|
|
171
|
+
duration({ url, state: 'success' })
|
|
167
172
|
return payload
|
|
168
173
|
} catch (err) {
|
|
169
174
|
const { isRejected, ...dataProps } = await fetchRes
|