feat: add proxy

This commit is contained in:
NunoSempere 2022-02-04 15:56:47 -05:00
parent 108da329d5
commit e0bc00d6e9

View File

@ -20,12 +20,20 @@ String.prototype.replaceAll = function replaceAll(search, replace) {
/* Body */
export async function goodjudgment() {
let results = [];
let proxy = await axios
.get("http://pubproxy.com/api/proxy?cookies=true")
.then((query) => query.data);
console.log(proxy);
for (let endpoint of endpoints) {
let content = await axios
.get(endpoint, {
headers: {
"User-Agent": "Axios",
},
proxy: {
host: proxy.ip,
port: proxy.port,
},
})
.then((query) => query.data);
let jsonTable = Tabletojson.convert(content, { stripHtmlFromCells: false });