【快代理API】更換隧道代理IP

接口描述

  • https://tps.kdlapi.com/api/changetpsip 接口地址
  • 更換隧道代理IP
  • 支持換IP週期>=1分鐘的隧道代理訂單

返回結果

在這裏插入圖片描述

參數說明

在這裏插入圖片描述

必填參數

  1. orderid 訂單號
  2. signature API Key

獲取訂單號和API Key教程

代碼樣例

import requests

# 使用隧道代理
# 隧道服務器
tunnel_host = "tps176.kdlapi.com"
tunnel_port = 15818

# 隧道id和密碼
tid = "t18538132507140"
password = "4zdldwy7"

proxies = {
    "http": "http://%s:%s@%s:%s/" % (tid, password, tunnel_host, tunnel_port),
    "https": "http://%s:%s@%s:%s/" % (tid, password, tunnel_host, tunnel_port)
}

r = requests.get("https://dev.kdlapi.com/testproxy", proxies=proxies)

# API接口
api_url = "https://tps.kdlapi.com/api/changetpsip"

# 訂單號跟API Key
orderid = 918538132507097
api_key = "azx0jv2f1r9ytsmzuxskvrf9rp01vcea"

# 參數
params = {
        "orderid": orderid,
        "signature": api_key,
        }

res = requests.get(api_url, params=params)
print(res.content)

運行結果,返回新的IP
在這裏插入圖片描述

進階學習

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章