node-curl-impersonate
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -1,2 +0,2 @@ | ||
import { CurlImpersonateOptions, CurlResponse } from "./interfaces"; | ||
import { CurlImpersonateOptions, CurlResponse } from "./interfaces.js"; | ||
export declare class CurlImpersonate { | ||
@@ -3,0 +3,0 @@ url: string; |
@@ -8,5 +8,5 @@ /* | ||
*/ | ||
import presets from "./presets.js"; | ||
import * as proc from "child_process"; | ||
import * as path from 'path'; | ||
import { presets } from "./presets"; | ||
export class CurlImpersonate { | ||
@@ -187,3 +187,2 @@ url; | ||
extractRequestData(verbose) { | ||
// Define regular expressions to extract information | ||
const ipAddressRegex = /Trying (\S+):(\d+)/; | ||
@@ -217,7 +216,7 @@ const httpStatusRegex = /< HTTP\/2 (\d+) ([^\n]+)/; | ||
match.forEach((header) => { | ||
const headerWithoutPrefix = header.substring(2); // Remove the first two characters | ||
const headerWithoutPrefix = header.substring(2); | ||
const headerParts = headerWithoutPrefix.split(': '); | ||
if (headerParts.length > 1) { | ||
const headerName = headerParts[0].trim(); // Trim any leading/trailing spaces | ||
const headerValue = headerParts[1].trim(); // Trim any leading/trailing spaces | ||
const headerName = headerParts[0].trim(); | ||
const headerValue = headerParts[1].trim(); | ||
responseHeaders[headerName] = headerValue; | ||
@@ -224,0 +223,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const presets: { | ||
declare const presets: { | ||
'chrome-110': { | ||
@@ -67,1 +67,2 @@ headers: { | ||
}; | ||
export default presets; |
@@ -1,2 +0,2 @@ | ||
export const presets = { | ||
const presets = { | ||
'chrome-110': { | ||
@@ -67,2 +67,3 @@ headers: { | ||
}; | ||
export default presets; | ||
//# sourceMappingURL=presets.js.map |
{ | ||
"name": "node-curl-impersonate", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A wrapper around cURL-impersonate, a binary which can be used to bypass TLS fingerprinting.", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"keywords": [ | ||
@@ -15,12 +16,7 @@ "web-scraping", | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@types/jest": "^29.5.5", | ||
"@types/node": "^20.17.6", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"@types/node": "^22.9.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"dependencies": { | ||
"esm": "^3.2.25", | ||
"ts-node": "^10.9.1" | ||
"ts-node": "^10.9.2" | ||
}, | ||
@@ -31,5 +27,4 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "npx tsc && node -r esm ./dist/index.js", | ||
"test": "jest" | ||
"build": "npx tsc" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
2
Yes
20928498
18
423
- Removedesm@^3.2.25
- Removedesm@3.2.25(transitive)
Updatedts-node@^10.9.2