抱歉.Google.com .NET WPF C# 4.0 应用程序需要验证码解决方法
我的应用程序使用 Google 来搜索信息并检索它。经过几次搜索后,我收到了可怕的 Soon.Google.com 消息,并要求我验证我不是机器人,然后我的应用程序崩溃了。当我看到验证码页面时,我需要代码将其实际呈现为弹出窗口或 WPF 浏览器窗口,以便可以输入该页面,然后应用程序将继续执行其正在执行的操作。我正在使用 HTTPWebRequest 来获取搜索引擎页面。我可以想象代码会看到 Google 首先提供验证码页面,因此它会停止活动而不是崩溃,允许某人输入验证码,然后继续正常获取信息。另一种解决方法是完全避免崩溃,但我也无法阻止这种情况。我最感兴趣的是解决验证码问题,因为我认为这将是最好的解决方案。任何有关此的代码将不胜感激。
My application uses Google to search for information and retrieves it. After a few searches, I get the dreaded Sorry.Google.com message and asking me to verify that I am not a bot and then my application crashes. I need the code to actually present the captcha page as a popup or WPF browser window when I am presented with it so that it can be entered and the application will then proceed on doing what it was doing. I am using HTTPWebRequest to fetch the search engine page. I can imagine the code would see that Google was first serving the captcha page so then it would halt activity instead of crashing, allow someone to enter the captcha and then proceed normally fetching the information. Another workaround would be to avoid crashing altogether but I have not been able to prevent that either. I am most interested in the solving the captcha issue as I think that would be the best solution. Any code for this would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使您确实设法做到了这一点,这也违反了 Google TOS,并且可能会导致您和您的用户被禁止。如果您想以某种自动化方式搜索 google,请考虑 Google 自定义搜索,它提供了实际的 API 供您查询。
http://www.google.com/cse/
Even if you did manage to do this, that's a violation of the Google TOS and will likely get you and your users banned. If you want to search google in some automated way, consider Google Custom Search which provides an actual API for you to query against.
http://www.google.com/cse/