빠른 시작
빠른 시작
섹션 제목: “빠른 시작”이 가이드는 아무것도 없는 상태에서 2분 안에 동작하는 프록시 요청까지 안내합니다.
사전 준비
섹션 제목: “사전 준비”- HydraSkill 계정 (무료 가입)
- API key (Dashboard → API Keys에서 발급)
- Python 3.8+ (또는 Node.js 18+)
1단계: 설치
섹션 제목: “1단계: 설치”pip install hydraskill2단계: 초기화
섹션 제목: “2단계: 초기화”from hydraskill import ProxyClient
client = ProxyClient(api_key="sk-your-key-here")또는 환경 변수를 설정하고 파라미터를 생략할 수 있습니다.
export HYDRASKILL_API_KEY="sk-your-key-here"client = ProxyClient() # 환경 변수에서 자동으로 읽음3단계: 프록시 가져오기
섹션 제목: “3단계: 프록시 가져오기”proxy = client.get_proxy( target="amazon.com", session_lock=True, country="US")
print(proxy.ip) # 203.0.113.42print(proxy.country) # USprint(proxy.type) # residential4단계: 사용하기
섹션 제목: “4단계: 사용하기”import requests
response = requests.get( "https://www.amazon.com/dp/B09V3KXJPB", proxies=proxy.to_dict())
print(response.status_code) # 200내부에서 일어나는 일
섹션 제목: “내부에서 일어나는 일”- HydraSkill이 대상 도메인(
amazon.com)을 분석합니다 - 최적의 IP 유형을 선택합니다 (이커머스에는 residential)
- US 풀에서 IP를 배정합니다
- 그 IP를 세션에 잠급니다 (반환하기 전까지 바뀌지 않음)
- IP가 차단되면 → 새 IP로 자동 전환하고 투명하게 재시도합니다
전체 예제: 웹 스크래핑 에이전트
섹션 제목: “전체 예제: 웹 스크래핑 에이전트”from hydraskill import ProxyClientimport requests
client = ProxyClient()
# 같은 IP로 상품 페이지 100개 스크래핑proxy = client.get_proxy(target="amazon.com", session_lock=True)
for product_id in product_ids: url = f"https://www.amazon.com/dp/{product_id}" resp = requests.get(url, proxies=proxy.to_dict())
if resp.status_code == 200: parse_product(resp.text) # 403/429를 처리할 필요 없음 — HydraSkill이 자동으로 복구합니다
# 완료 — 프록시 반환proxy.release()Node.js 예제
섹션 제목: “Node.js 예제”import { ProxyClient } from 'hydraskill';
const client = new ProxyClient({ apiKey: process.env.HYDRASKILL_API_KEY });
const proxy = await client.getProxy({ target: 'amazon.com', sessionLock: true, country: 'US',});
const response = await fetch('https://www.amazon.com/dp/B09V3KXJPB', { agent: proxy.toAgent(),});
console.log(response.status); // 200await proxy.release();다음 단계
섹션 제목: “다음 단계”- Session Lock — IP 바인딩 이해하기
- Auto-Heal — 페일오버 동작 방식
- API 레퍼런스 — 전체 엔드포인트 문서