python curl node Copy
import requests
BASE = "https://scrapivore.com"
TOKEN = "YOUR_TOKEN"
HEADERS = {"Authorization": f"Token {TOKEN}"}
# Add in bulk, one proxy per line
lines = "1.2.3.4:8080:user:pass\n5.6.7.8:3128"
requests.post(
f"{BASE}/api/proxies/",
headers=HEADERS,
json={"lines": lines},
)
# Add one with its type and a label
requests.post(
f"{BASE}/api/proxies/",
headers=HEADERS,
json={
"ip": "9.10.11.12",
"port": "1080",
"type": "socks5",
"login": "user",
"password": "pass",
"label": "home",
},
)
# Check them, then scrape through them only
check = requests.post(
f"{BASE}/api/proxies/check/",
headers=HEADERS,
)
print(check.json())
r = requests.post(
f"{BASE}/api/scrape/",
headers=HEADERS,
json={
"url": "https://httpbin.org/ip",
"source": "byop",
},
) BASE="https://scrapivore.com"
TOKEN="YOUR_TOKEN"
# Add in bulk, one proxy per line
curl -X POST "$BASE/api/proxies/" \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-d '{"lines":
"1.2.3.4:8080:user:pass\n5.6.7.8:3128"}'
# Check them
curl -X POST "$BASE/api/proxies/check/" \
-H "Authorization: Token $TOKEN" const BASE = "https://scrapivore.com";
const TOKEN = "YOUR_TOKEN";
const headers = {
Authorization: `Token ${TOKEN}`,
"Content-Type": "application/json",
};
// Add in bulk, one proxy per line
const lines = [
"1.2.3.4:8080:user:pass",
"5.6.7.8:3128",
].join("\n");
await fetch(`${BASE}/api/proxies/`, {
method: "POST",
headers,
body: JSON.stringify({ lines }),
});
// Check them
const url = `${BASE}/api/proxies/check/`;
const res = await fetch(url, {
method: "POST",
headers,
});
console.log(await res.json()); Response · check
{
"checked": 3,
"results": [
{ "proxy": "1.2.3.4:8080",
"alive": true },
…
]
}