html-get 2.14.0 → 2.14.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 +4 -3
- package/src/auto-domains.json +1 -1
- package/src/index.js +3 -1
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.14.
|
|
5
|
+
"version": "2.14.2",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"html-get": "bin/index.js"
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"@commitlint/cli": "latest",
|
|
51
51
|
"@commitlint/config-conventional": "latest",
|
|
52
52
|
"@ksmithut/prettier-standard": "latest",
|
|
53
|
-
"
|
|
53
|
+
"async-listen": "latest",
|
|
54
|
+
"ava": "5",
|
|
54
55
|
"browserless": "latest",
|
|
55
56
|
"c8": "latest",
|
|
56
57
|
"ci-publish": "latest",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
],
|
|
78
79
|
"scripts": {
|
|
79
80
|
"clean": "rm -rf node_modules",
|
|
80
|
-
"contributors": "(npx git-authors-cli && npx finepack
|
|
81
|
+
"contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
81
82
|
"lint": "standard-markdown README.md && standard",
|
|
82
83
|
"postinstall": "node scripts/postinstall",
|
|
83
84
|
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
|
package/src/auto-domains.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[[["domainWithoutSuffix","google"]],[["domainWithoutSuffix","youtube"]],[["domainWithoutSuffix","microsoft"]],[["domainWithoutSuffix","apple"]],[["domainWithoutSuffix","
|
|
1
|
+
[[["domainWithoutSuffix","google"]],[["domainWithoutSuffix","youtube"]],[["domainWithoutSuffix","microsoft"]],[["domainWithoutSuffix","apple"]],[["domainWithoutSuffix","wikipedia"]],[["domainWithoutSuffix","wordpress"]],[["domainWithoutSuffix","blogspot"]],[["domainWithoutSuffix","vimeo"]],[["domainWithoutSuffix","github"]],[["domainWithoutSuffix","slideshare"]],[["domainWithoutSuffix","theguardian"]],[["domainWithoutSuffix","imdb"]],[["domainWithoutSuffix","bbc"]],[["domainWithoutSuffix","nytimes"]],[["domainWithoutSuffix","huffingtonpost"]],[["domainWithoutSuffix","soundcloud"]],[["domainWithoutSuffix","pinterest"]],[["domainWithoutSuffix","telegraph"]],[["domainWithoutSuffix","twitter"]],[["domainWithoutSuffix","spotify"]],[["domainWithoutSuffix","eventbrite"]],[["domain","abc.net.au"]],[["domainWithoutSuffix","stackoverflow"]],[["domainWithoutSuffix","zoom"]],[["domainWithoutSuffix","techcrunch"]],[["domainWithoutSuffix","yelp"]],[["domainWithoutSuffix","engadget"]],[["domainWithoutSuffix","theverge"]],[["domainWithoutSuffix","etsy"]],[["domainWithoutSuffix","flickr"]],[["domainWithoutSuffix","substack"]],[["domainWithoutSuffix","giphy"]],[["domainWithoutSuffix","csdn"]],[["domainWithoutSuffix","deviantart"]],[["domainWithoutSuffix","digg"]],[["domainWithoutSuffix","dribbble"]],[["domainWithoutSuffix","ghost"]],[["domainWithoutSuffix","gitlab"]],[["domainWithoutSuffix","imgur"]],[["domainWithoutSuffix","meetup"]],[["domainWithoutSuffix","producthunt"]],[["domainWithoutSuffix","sourceforge"]],[["domainWithoutSuffix","tumblr"]],[["domainWithoutSuffix","ycombinator"]]]
|
package/src/index.js
CHANGED
|
@@ -39,7 +39,9 @@ const fetch = PCancelable.fn(
|
|
|
39
39
|
const res = await req
|
|
40
40
|
return {
|
|
41
41
|
headers: res.headers,
|
|
42
|
-
html:
|
|
42
|
+
html: isMediaUrl(url)
|
|
43
|
+
? res.body
|
|
44
|
+
: await toEncode(res.body, res.headers['content-type']),
|
|
43
45
|
mode: 'fetch',
|
|
44
46
|
url: res.url,
|
|
45
47
|
statusCode: res.statusCode
|