简体   繁体   English

发布请求alidate验证码C#

[英]post request alidate captcha c#

I' coding a program that does post request on a website but sometimes (not always) there is a captcha to solve. 我正在编写一个程序来在网站上发布请求,但是有时(并非总是)有一个验证码可以解决。 (need to click on bus images). (需要点击公交车图片)。

I want to know how can I check if there is a captcha to validate (if so my program opens a window and the human solves it), if there is no captcha, the program continues. 我想知道如何检查是否有验证码(如果这样,我的程序会打开一个窗口并由人类解决),如果没有验证码,则程序会继续。

When there is no captcha there is a g-recaptcha-response to put in the form but I have no idea what to put. 如果没有验证码,则会在表格中添加一个g-recaptcha-response,但我不知道该输入什么。 If there is a captcha I guess that when the person behind the computer solves it, google sends the g-recaptcha-response and I need to put it in the form. 如果有验证码,我猜想当计算机后面的人解决该验证码时,Google会发送g-recaptcha-response,我需要将其放入表格中。 is that correct? 那是对的吗?

thank you very much. 非常感谢你。

if you need more infos I will add everything. 如果您需要更多信息,我将添加所有内容。

edit add: 编辑添加: 在此处输入图片说明

First, you must debug to live HTML website captcha HTML element id. 首先,您必须调试实时HTML网站验证码HTML元素ID。

After that, you must query to response HTML. 之后,您必须查询以响应HTML。

If you find captcha element you must show captcha to the user. 如果找到验证码元素,则必须向用户显示验证码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM