国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

python實(shí)現(xiàn)騰訊滑塊驗(yàn)證碼識(shí)別

瀏覽:6日期:2022-06-20 18:51:49

騰訊滑塊驗(yàn)證碼識(shí)別,識(shí)別凹槽的x軸位置,mock滑塊的加速度。該項(xiàng)目公開(kāi)API,提供識(shí)別和加速度模擬部分,第二部分模擬滑動(dòng)進(jìn)行識(shí)別返回?cái)?shù)據(jù)請(qǐng)求

項(xiàng)目地址:https://github.com/zhaojunlike/python-tecent-slider-crack

安裝python環(huán)境

參考:https://janikarhunen.fi/how-to-install-python-3-6-1-on-centos-7

sudo yum install https://centos7.iuscommunity.org/ius-release.rpmsudo yum install python36upython3.6 -Vsudo yum install python36u-pipsudo yum install python36u-devel創(chuàng)建環(huán)境 Creating a virtualenv

python3.6 -m venv venv. venv/bin/activatepip install [package_name]# 安裝依賴(lài)pip install -r requirements.txt daemonize 運(yùn)行

# 參考 https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uswgi-and-nginx-on-ubuntu-18-04# Install the latest stable release:pip install uwsgi# ... or if you want to install the latest LTS (long term support) release,pip install https://projects.unbit.it/downloads/uwsgi-lts.tar.gz# 創(chuàng)建ln cp captcha.service /etc/systemd/system/captcha.servicesystemctl enable captcha.servicesystemctl start captcha.service

uwsgi --ini /usr/local/nginx/html/myblog/uwsgiconfig.ini#后臺(tái)運(yùn)行uwsgi --ini /usr/local/nginx/html/myblog/uwsgiconfig.ini --daemonize /usr/local/nginx/html/myblog/myblog.outnginx做代理

location /tx/ { add_header Access-Control-Allow-Origin *; includeuwsgi_params; uwsgi_pass 127.0.0.1:8008;}訪(fǎng)問(wèn)api

請(qǐng)求圖片識(shí)別和加速度模擬

http://127.0.0.1:5000/tx/imagePOST /tx/image HTTP/1.1Host:hostContent-Type: application/jsonAccept: */*Cache-Control: no-cacheAccept-Encoding: gzip, deflateContent-Length: 1055Connection: keep-alivecache-control: no-cache{ 'url': '圖片的地址'}返回?cái)?shù)據(jù){ 'data': {'list': [],//模擬的點(diǎn)'url': '',//圖片地址'x': 515,// x軸的偏移量 }, 'message': '解析成功'}模擬瀏覽器移動(dòng)

const slider = {width: 680, point: 0, move: 0, steps: 0, posX: 0};//原本的高度 //開(kāi)始計(jì)算移動(dòng)的距離 slider.point = bgSize.width / slider.width * x; slider.move = handle.x + slider.point - 5; slider.steps = Math.random() * 100 / 30 + 100; slider.posX = handle.x + handle.width / 2; logger.info(`開(kāi)始識(shí)別和移動(dòng)滑塊`, slider); //滑塊的位置 await page.mouse.move(slider.posX, handle.y + handle.height / 3, {steps: slider.steps}); await page.mouse.down(); let val = handle.x; for (let i = 0; i < traces.length; i++) {val += bgSize.width / slider.width * (traces[i]);//縮放距離slider.move = val;if (val <= slider.posX) continue;await page.mouse.move(slider.move, handle.y + handle.height / 2 + 5); } await page.waitFor(100); await page.mouse.up();

驗(yàn)證碼識(shí)別成功后悔返回驗(yàn)證識(shí)別結(jié)果的Ticket

python實(shí)現(xiàn)騰訊滑塊驗(yàn)證碼識(shí)別

協(xié)議

授權(quán)協(xié)議:只允許研究、學(xué)習(xí)目的的分享、使用、修改,不允許任何商業(yè)用途。

原文地址:https://segmentfault.com/a/1190000020618430

以上就是python實(shí)現(xiàn)騰訊滑塊驗(yàn)證碼識(shí)別的詳細(xì)內(nèi)容,更多關(guān)于python 滑塊驗(yàn)證碼識(shí)別的資料請(qǐng)關(guān)注好吧啦網(wǎng)其它相關(guān)文章!

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 黔南| 日照市| 隆安县| 天津市| 乡城县| 辉南县| 桂平市| 新安县| 瓦房店市| 开封县| 冀州市| 岑巩县| 哈尔滨市| 左云县| 襄城县| 邓州市| 措勤县| 体育| 垫江县| 永宁县| 额尔古纳市| 淮安市| 兴化市| 孟津县| 浦江县| 饶河县| 平潭县| 安新县| 潞西市| 板桥市| 正宁县| 辰溪县| 黎平县| 蚌埠市| 布尔津县| 郎溪县| 南江县| 武威市| 浙江省| 鲜城| 永春县|