Update http.js

This commit is contained in:
Namhyeon Go 2024-09-21 14:22:57 +09:00 committed by GitHub
parent 5f91e9be12
commit 9f8e930a45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,39 +13,8 @@ var OS_NAME = SYS.getOS();
var OS_ARCH = SYS.getArch(); var OS_ARCH = SYS.getArch();
var DEVICE_UUID = SYS.getUUID(); var DEVICE_UUID = SYS.getUUID();
var PROCESS_VERSION = SYS.getProcessVersion(); var PROCESS_VERSION = SYS.getProcessVersion();
var DEFAULT_USER_AGENT = "WelsonJS/0.2.7 (" + OS_NAME + "; " + OS_ARCH + "; " + PROCESS_VERSION + "; " + DEVICE_UUID + "; abuse@catswords.net)"; var DEFAULT_USER_AGENT;
var AVAILABLE_PROXIES = [ var AVAILABLE_PROXIES;
{
"type": "stateless",
"provider": "scrapeops",
"url": "https://proxy.scrapeops.io/v1/?api_key={api_key}&url={url}&render_js={render_js}&residential={residential}&country={country}&keep_headers={keep_headers}",
"documentation": "https://scrapeops.io?fpr=namhyeon75"
},
{
"type": "stateful",
"provider": "scrapeops",
"url": "http://scrapeops:{api_key}@residential-proxy.scrapeops.io:8181",
"documentation": "https://scrapeops.io?fpr=namhyeon75"
},
{
"type": "stateless-jsonrpc2",
"provider": "gnh1201/caterpillar",
"url": "http://localhost:5555",
"documentation": "https://github.com/gnh1201/caterpillar"
},
{
"type": "stateful",
"provider": "gnh1201/caterpillar",
"url": "http://localhost:5555",
"documentation": "https://github.com/gnh1201/caterpillar"
},
{
"type": "stateful",
"provider": "cloudflare",
"url": "http://localhost:40000",
"documentation": "https://developers.cloudflare.com/warp-client/warp-modes/"
}
];
var HTTPObject = function(engine) { var HTTPObject = function(engine) {
this._interface = null; this._interface = null;
@ -1155,6 +1124,40 @@ function parseURL(url) {
}; };
} }
DEFAULT_USER_AGENT = "WelsonJS/0.2.7 (" + OS_NAME + "; " + OS_ARCH + "; " + PROCESS_VERSION + "; " + DEVICE_UUID + "; abuse@catswords.net)";
AVAILABLE_PROXIES = [
{
"type": "stateless",
"provider": "scrapeops",
"url": "https://proxy.scrapeops.io/v1/?api_key={api_key}&url={url}&render_js={render_js}&residential={residential}&country={country}&keep_headers={keep_headers}",
"documentation": "https://scrapeops.io?fpr=namhyeon75"
},
{
"type": "stateful",
"provider": "scrapeops",
"url": "http://scrapeops:{api_key}@residential-proxy.scrapeops.io:8181",
"documentation": "https://scrapeops.io?fpr=namhyeon75"
},
{
"type": "stateless-jsonrpc2",
"provider": "gnh1201/caterpillar",
"url": "http://localhost:5555",
"documentation": "https://github.com/gnh1201/caterpillar"
},
{
"type": "stateful",
"provider": "gnh1201/caterpillar",
"url": "http://localhost:5555",
"documentation": "https://github.com/gnh1201/caterpillar"
},
{
"type": "stateful",
"provider": "cloudflare",
"url": "http://localhost:40000",
"documentation": "https://developers.cloudflare.com/warp-client/warp-modes/"
}
];
exports.create = create; exports.create = create;
exports.get = get; exports.get = get;
exports.post = post; exports.post = post;