百度点选和滑块验证码接口调用
1) 请求地址
https://d175582r32.oicp.vip/api/baidudianxuan
https://d175582r32.oicp.vip/api/baiduhuakuai (滑块验证链接)
https://d175582r32.oicp.vip/api/baiduclick (文字点选,底图和文字分开请求)
title.png
字段名称 | 字段说明 | 类型 | 必填 | 备注 |
---|---|---|---|---|
token | string | Y | token | |
image | 图片二进制字符串 | string | Y | 图片 |
title | 图片二进制字符串 | string | Y | 图片 |
5) python代码 :
import base64,requests,time,json# 打码token
token=''
# 图片content
with open('image.png', 'rb')as f:
file=f.read()
image_b64 = base64.b64encode(file).decode()
# print(b64)
f.close()
with open('title.png', 'rb')as f:
file=f.read()
title_b64 = base64.b64encode(file).decode()
# print(b64)
f.close()
urlt = 'https://d175582r32.oicp.vip/api/baidudianxuan'
# https://d175582r32.oicp.vip/api/baiduhuakuai (滑块验证链接)
# https://d175582r32.oicp.vip/api/baiduclick (文字点选,底图和文字分开请求)
data = {
'token': token,
'image': image_b64
'title': title_b64, # 文字点选验证码的 文字图片
}
while True:
try:
# response = requests.post(urlt,files={'file':file},timeout=5)
response = requests.post(urlt, data=json.dumps(data), timeout=5)
# logging.info(response.json())
print(response.text)
if response.json()['status']==0:
# point=response.json()['data']
break
elif response.json()['status'] == 4:
input('打码点数不足 ,请联系站长QQ61910465充值')
elif response.json()['status'] == 2:
input('config配置文件中打码token错误 ,或者token为空')
else:
time.sleep(1)
except Exception as e:
print(e)
time.sleep(3)
-------------------------------------------------------分割线----------------------------------------------------
百度旋转验证码接口调用接口1
字段名称 | 字段说明 | 类型 | 必填 | 备注 |
---|---|---|---|---|
token | string | Y | token | |
image | 图片二进制字符串 | string | Y | 图片 |
5) 百度旋转验证码识别易语言代码演示:
链接:https://pan.baidu.com/s/1r71ywg5T4s-21tnJq_9SpA?pwd=uzfc
提取码:uzfc
import base64,requests,time,json# 打码token token='' # 图片content with open('./1.png', 'rb')as f: image=f.read() f.close()# 二进制加密 base64_data = base64.b64encode(image) b64 = base64_data.decode() b64 = str(base64_data) #或者如下转为字符串类型 urlt = 'https://d175582r32.oicp.vip/api/baiducor' data = { 'token': token, 'image': b64} try: response = requests.post(urlt, data=json.dumps(data)) print(response.json()) # {'status': 0, 'msg': 'success', 'point': '254','px':'88', 'remain': '22798', 'totle': '60000'} # {'status': 1, 'msg': '服务器过载'} 请求失败 # {'status': 2, 'msg': '非法token'} token错误或者为空 # {'status': 4, 'msg': '打码点数不足'} if response.json()['status'] == 0: point = response.json()['point'] except: time.sleep(1)
百度旋转验证码接口调用接口2
1) 请求地址
字段名称 | 字段说明 | 类型 | 必填 | 备注 |
---|---|---|---|---|
file | 图片字节集 | string | Y | 图片 |
6) python代码演示
token='g3hwae39nqbvgmj72q3n47fa46r4ei6l' urlt = 'https://d175582r32.oicp.vip/api/baiducor1?token='+token with open('./1.png', 'rb')as f: file=f.read() f.close() response = requests.post(urlt,files={'file':file})
7) 失败请求返回结果:
{'status': 1, 'msg': '服务器过载'} 请求失败 {'status': 2, 'msg': '非法token'} token错误或者为空 {'status': 4, 'msg': '打码点数不足'}
{'status': 0, 'msg': 'success', 'point': '254','px':'88', 'remain': '22798', 'totle': '60000'}
字段名称 | 字段说明 | 类型 | 必填 | 备注 |
---|---|---|---|---|
status | string | Y | ||
point | string | Y | 图片角度 | |
px | string | Y | 移动距离 | |
remain | string | Y | 剩余打码 | |
totle | string | Y | 打码总数 |
百度旋转验证码接口调用接口3
1) 请求地址
字段名称 | 字段说明 | 类型 | 必填 | 备注 |
---|---|---|---|---|
ck | 字符串 | string | Y | 百度账号cookies |
ak | 字符串 | string | Y | 百度旋转验证码ak值 |
6) python代码演示
# -*- coding: utf-8 -*- import requests # https://www.sonnde.com/ url = "https://d175582r32.oicp.vip/api/tkds" UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36" # g3hwae39nqbvgmj72q3n47fa46r4ei6l # pn3746cm9yvl9arb9d0d4vb8rdi25iix querystring = {"token":"g3hwae39nqbvgmj72q3n47fa46r4ei6l"} #旋转验证码 todo "project_name":"rotate_v2" 百度V2验证 , rotate_v1 百度V1验证 "project_name":"rotate_bjh" 百家号 # "ak":"ecufIZkFOt4DBhoSHZDu3qWRqrP3kZRf" 根据开发者实际情况 请填写对应的ak值 #滑块验证码 todo "project_name":"slide_v2" 百度V2验证 #点选验证码 todo "project_name":"click_v2" 百度V2验证 # "ak":"95bc180bb2363caf86738d1bf67b97bc" 根据开发者实际情况 请填写对应的ak值 # f97ed2b265409c9fb91e81265f597678 payload = {"project_name":"rotate_bjh", "ak": "f97ed2b265409c9fb91e81265f597678", "refer": "https://baijiahao.baidu.com/builder/rc/edit?type=news", "ck": "bjhStoken=6c925786591cfdc278f031f064R~WF", "ua": UA #传入的UA 要与自己发送请求的UA值一致 否则百度会报错 } headers = {"content-type": "application/json"} response = requests.request("POST", url, json=payload, params=querystring) print(response.text)
7) 失败请求返回结果:
{'status': 1, 'msg': '服务器过载'} 请求失败 {'status': 2, 'msg': '非法token'} token错误或者为空 {'status': 3, 'msg': '非法ck'} ck错误或者为空 {'status': 4, 'msg': '打码点数不足'} {'status': 5, 'msg': '验证错误'} {'status': 6, 'msg': 'ak错误'}
{"status":0,"remain":7843,"totle":"仅供测试,正式打码请联系QQ61910465","data":{"tk":"1169DIprASqP/UVrv/LbIpBoxhj686x8aVv+DmpI/tarpH8M2I/TouzBt1TUx//p1r5N/wBKukRZ3bjNJisM7btBsTDjIU1Dspr0AqQflaxWpgTtsJXfEe2y10oNwqlToe4J","as":"2d7b15e0","ds":"lD0aFwTCTBrWAeE2aEe2aqBXc2Tl7eTDwqy7CxM24OIlsW5BX46jfFX0rJguaNTvSfw9LNvQxxlMYEJTf5kk12LzXkKDOP5QKcAHU/36Fkq5QdHCF47A4zbiK79QWrqiVvZI6VhW1QQz1XvIXWc/Nkrw22oq5OokjpMfZNG7qBf4qvVErve/nV5R/Fp7JFp6AUwhl+qwYq+7sjj+HZSzWPEAcK+5skk+S72nnotRhR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