linkedin checks bypass 🔥

This commit is contained in:
Vishwa Gaurav
2024-08-09 23:43:51 +05:30
parent cc44fbf9ce
commit 0969726fed
3 changed files with 58 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
const cheerio = require("cheerio"); const cheerio = require("cheerio");
const axios = require("axios"); const axios = require("axios");
const randomUseragent = require("random-useragent");
module.exports.query = (queryObject) => { module.exports.query = (queryObject) => {
const query = new Query(queryObject); const query = new Query(queryObject);
@@ -102,10 +103,11 @@ Query.prototype.getJobs = async function () {
allJobs = []; allJobs = [];
while (resultCount > 0) { while (resultCount > 0) {
const userAgent = randomUseragent.getRandom();
const { data } = await axios.get(this.url(start), { const { data } = await axios.get(this.url(start), {
headers: { headers: {
"User-Agent": "User-Agent": userAgent,
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
Accept: Accept:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.9", "Accept-Language": "en-US,en;q=0.9",

55
package-lock.json generated
View File

@@ -1,16 +1,17 @@
{ {
"name": "linkedin-jobs-api", "name": "linkedin-jobs-api",
"version": "1.0.0", "version": "1.0.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "linkedin-jobs-api", "name": "linkedin-jobs-api",
"version": "1.0.0", "version": "1.0.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"cheerio": "^1.0.0-rc.12" "cheerio": "^1.0.0-rc.12",
"random-useragent": "^0.5.0"
} }
}, },
"node_modules/asynckit": { "node_modules/asynckit": {
@@ -225,6 +226,12 @@
"entities": "^4.3.0" "entities": "^4.3.0"
} }
}, },
"node_modules/json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
"license": "ISC"
},
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -277,6 +284,27 @@
"funding": { "funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1" "url": "https://github.com/inikulin/parse5?sponsor=1"
} }
},
"node_modules/random-seed": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/random-seed/-/random-seed-0.3.0.tgz",
"integrity": "sha512-y13xtn3kcTlLub3HKWXxJNeC2qK4mB59evwZ5EkeRlolx+Bp2ztF7LbcZmyCnOqlHQrLnfuNbi1sVmm9lPDlDA==",
"license": "MIT",
"dependencies": {
"json-stringify-safe": "^5.0.1"
},
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/random-useragent": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/random-useragent/-/random-useragent-0.5.0.tgz",
"integrity": "sha512-FUMkqVdZeoSff5tErNL3FFGYXElDWZ1bEuedhm5u9MdCFwANriJWbHvDRYrLTOzp/fBsBGu5J1cWtDgifa97aQ==",
"license": "MIT",
"dependencies": {
"random-seed": "^0.3.0"
}
} }
}, },
"dependencies": { "dependencies": {
@@ -420,6 +448,11 @@
"entities": "^4.3.0" "entities": "^4.3.0"
} }
}, },
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="
},
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -457,6 +490,22 @@
"domhandler": "^5.0.2", "domhandler": "^5.0.2",
"parse5": "^7.0.0" "parse5": "^7.0.0"
} }
},
"random-seed": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/random-seed/-/random-seed-0.3.0.tgz",
"integrity": "sha512-y13xtn3kcTlLub3HKWXxJNeC2qK4mB59evwZ5EkeRlolx+Bp2ztF7LbcZmyCnOqlHQrLnfuNbi1sVmm9lPDlDA==",
"requires": {
"json-stringify-safe": "^5.0.1"
}
},
"random-useragent": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/random-useragent/-/random-useragent-0.5.0.tgz",
"integrity": "sha512-FUMkqVdZeoSff5tErNL3FFGYXElDWZ1bEuedhm5u9MdCFwANriJWbHvDRYrLTOzp/fBsBGu5J1cWtDgifa97aQ==",
"requires": {
"random-seed": "^0.3.0"
}
} }
} }
} }

View File

@@ -26,6 +26,7 @@
"homepage": "https://github.com/VishwaGauravIn/linkedin-jobs-api#readme", "homepage": "https://github.com/VishwaGauravIn/linkedin-jobs-api#readme",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"cheerio": "^1.0.0-rc.12" "cheerio": "^1.0.0-rc.12",
"random-useragent": "^0.5.0"
} }
} }