拿到列表链接
付款后,个人中心会显示类似 get.advanced.name/<ID> 的链接。它返回 ip:port 行,每行一个地址。HTTP 和 SOCKS5 在同一个端口上。
一次采集是跑完,还是死在第一个验证码上,取决于四件事。
地址足够多,同一个 IP 一分钟内不会访问网站两次
一个列表里有 5,000(1 号套餐)到 50,000(6 号套餐)个地址
代理池要新:被封的 IP 得在你用到之前就撤下
每 24 小时轮换约三分之一,列表每 10 分钟刷新一次
整个采集过程都有足够的并发连接
按套餐 500 到 5,000 线程,所有协议在同一个端口
没人盯着你的流量
所有不限流量套餐都不限流量:您为套餐和线程付费
地区、套餐、时长。价格按一个授权 IP 计算,每多授权一个 IP 加 10%。
付款后,个人中心会显示类似 get.advanced.name/<ID> 的链接。它返回 ip:port 行,每行一个地址。HTTP 和 SOCKS5 在同一个端口上。
列表只对你在个人中心添加的 IP 开放。爬虫配置里不用写用户名和密码,地址本身就是钥匙。
载入列表,循环使用;某个请求失败时,换下一个代理重试该 URL。下面的脚本只用标准库就做到了这一点。
把 CSV_URL 指向个人中心的导出链接,设置 COUNTRY 和 MIN_SPEED,把目标 URL 放进 urls.txt。脚本只保留你需要的国家,每个 URL 都通过下一个代理抓取,失败时换一个地址重试。开始前先用Socks List Processor 检查代理池。
#!/usr/bin/env python3
"""Multithreaded scraper for Advanced.name proxies.
Reads the CSV proxy export, keeps the country and speed you need, then fetches a
list of target URLs through rotating proxies with automatic retries. Standard
library only, no pip. Edit the CONFIG block and run: python3 scrape.py
"""
# ================================ CONFIG ====================================
CSV_URL = "https://get.advanced.name/YOUR_LIST_ID.csv" # CSV export link from your dashboard
COUNTRY = "DE" # ISO 3166-1 alpha-2 (e.g. DE, NL, US), or "" for the whole pool
MIN_SPEED = 3 # keep proxies with speed >= this value (higher is better)
THREADS = 50 # parallel requests
TIMEOUT = 15 # seconds per request
RETRIES = 3 # proxies to try before a URL is marked failed
URLS_FILE = "urls.txt" # one target URL per line
OUT_DIR = "pages" # fetched HTML is written here as 1.html, 2.html, ...
# ============================================================================
import csv
import io
import itertools
import os
import sys
import threading
import urllib.request
from concurrent.futures import ThreadPoolExecutor, as_completed
# CSV columns from the dashboard export, ';' separated:
# ip ; port ; country ; speed ; uptime ; exit_ip
COL_IP, COL_PORT, COL_COUNTRY, COL_SPEED, COL_UPTIME = 0, 1, 2, 3, 4
UA = "Mozilla/5.0 (compatible; scraper/1.0)"
def load_proxies():
"""Download the CSV list, keep the wanted country and speed, fastest first."""
raw = urllib.request.urlopen(CSV_URL, timeout=30).read().decode("utf-8", "replace")
pool = []
for row in csv.reader(io.StringIO(raw), delimiter=";"):
if len(row) <= COL_SPEED or not row[COL_PORT].strip().isdigit():
continue
country = row[COL_COUNTRY].strip().upper()
speed = int(row[COL_SPEED] or 0)
if COUNTRY and country != COUNTRY.upper():
continue
if speed < MIN_SPEED:
continue
pool.append((row[COL_IP].strip() + ":" + row[COL_PORT].strip(), speed))
pool.sort(key=lambda item: -item[1])
return [addr for addr, _ in pool]
def opener_for(proxy):
handler = urllib.request.ProxyHandler({"http": "http://" + proxy, "https": "http://" + proxy})
return urllib.request.build_opener(handler)
def main():
proxies = load_proxies()
if not proxies:
sys.exit("No proxies match COUNTRY=%r and MIN_SPEED=%d." % (COUNTRY, MIN_SPEED))
with open(URLS_FILE, encoding="utf-8") as fh:
urls = [u for u in map(str.strip, fh) if u and not u.startswith("#")]
os.makedirs(OUT_DIR, exist_ok=True)
print("proxies: %d (%s), urls: %d, threads: %d" % (len(proxies), COUNTRY or "any", len(urls), THREADS))
rotation = itertools.cycle(proxies)
lock = threading.Lock()
done = {"ok": 0, "fail": 0}
def fetch(index, url):
for _ in range(RETRIES):
with lock:
proxy = next(rotation)
req = urllib.request.Request(url, headers={"User-Agent": UA})
try:
body = opener_for(proxy).open(req, timeout=TIMEOUT).read()
except Exception:
continue
with open(os.path.join(OUT_DIR, "%d.html" % index), "wb") as out:
out.write(body)
return True
return False
with ThreadPoolExecutor(max_workers=THREADS) as pool:
futures = {pool.submit(fetch, i, u): u for i, u in enumerate(urls, 1)}
for fut in as_completed(futures):
ok = fut.result()
with lock:
done["ok" if ok else "fail"] += 1
total = done["ok"] + done["fail"]
sys.stderr.write("\r%d/%d ok %d fail %d" % (total, len(urls), done["ok"], done["fail"]))
sys.stderr.flush()
print("\nsaved %d pages to %s/ (%d failed)" % (done["ok"], OUT_DIR, done["fail"]))
if __name__ == "__main__":
main()
每个请求都传入代理:用 ProxyHandler 构建 opener,或者给 requests 传 proxies={'http': 'http://ip:port', 'https': 'http://ip:port'}。HTTP 和 SOCKS 共用一个端口,所以 http:// 两者都能用;在 requests 中使用 SOCKS5 时,安装 requests[socks] 并写 socks5h://ip:port,让 DNS 在代理端解析。
列表读一次,循环使用,每个请求取下一个地址。失败的 URL 换别的代理重试两三次再放弃;上面的脚本已经这样做了。
在 Scrapy 中把地址写进 request.meta['proxy'],或者使用指向生成文件的代理轮换中间件,并让 CONCURRENT_REQUESTS 不超过套餐的线程上限。Octoparse、ParseHub 这类可视化爬虫在代理设置里接受同样的 ip:port 列表。
长时间采集前,先用Socks List Processor 把代理池过滤一遍,别让失效地址进到解析器。只是快速试一下代码,用免费代理列表就够了。


大批量抓取用不限流量套餐更便宜。封禁列表地址的网站用Resi Core突破,城市级数据用Resi Prime采集。
大批量抓取最佳选择
流量不计量:几GB的HTML和图片也不会改变价格。每天有三分之一的地址更换,被封的地址会移出列表。
$700 每月或每小时$2.70
有防护的网站
每次请求换一个新的家庭IP。适用于套餐地址会遇到验证码的网站。国家在连接字符串中设置。
低至 $0.49 每GB1GB仅需$0.85
城市级数据
在连接字符串中设置城市、地区、运营商和ASN。当网站对不同城市返回不同数据时就需要它。
低至 $1.39 每GB1GB仅需$2.29