import requests
BASE = "https://scrapivore.com"
TOKEN = "YOUR_TOKEN"
HEADERS = {"Authorization": f"Token {TOKEN}"}
r = requests.get(
f"{BASE}/api/stats/domain/",
headers=HEADERS,
params={"domain": "httpbin.org"},
)
for p in r.json()["rows"]:
print(p["proxy_addr"], p["success_rate"])
by_country = requests.get(
f"{BASE}/api/stats/country/",
headers=HEADERS,
).json()
print(by_country["rows"])BASE="https://scrapivore.com"
TOKEN="YOUR_TOKEN"
curl -G "$BASE/api/stats/domain/" \
-d domain=httpbin.org \
-H "Authorization: Token $TOKEN"
const BASE = "https://scrapivore.com";
const TOKEN = "YOUR_TOKEN";
const headers = {
Authorization: `Token ${TOKEN}`,
"Content-Type": "application/json",
};
const qs = new URLSearchParams({
domain: "httpbin.org",
});
const res = await fetch(
`${BASE}/api/stats/domain/?${qs}`,
{ headers },
);
const { rows, bans } = await res.json();Response · domain
{
"domain": "httpbin.org",
"rows": [
{
"proxy_addr": "184.181.178.33:4145",
"success_count": 41,
"fail_count": 3,
"success_rate": 0.932,
…
}
],
"bans": []
}