我一直在使用GetSearchResults网络服务,它突然停止工作,因为它要求我回复一个没有任何意义的Captcha,因为它是一个API因此不应该要求人为响应。
此代码在Google App Engine中运行。在localhost上它工作正常,但在生产中失败。
下面显示了我的代码尝试获取的内容。即将推出的HTML包含一个Captcha。我应该改回XML。发生了什么事?
zillow: http://www.zillow.com/webservice/GetSearchResults.htm?zws-id=[API KEY REMOVED]&address=10797+Alameda+Ave&citystatezip=92316&rentzestimate=1
zillow results:
<html><head><title>Zillow: Real Estate, Apartments, Mortgage & Home Values in the US</title><meta http-equiv="X-UA-Compatible" content="IE=8, IE=9"/><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/><link href="//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin" rel="stylesheet" type="text/css"/><link href="http://www.zillowstatic.com/vstatic/5b67875/static/css/z-pages/captcha.css" type="text/css" rel="stylesheet" media="screen"/><script language="javascript">
function onReCaptchaLoad() {
window.reCaptchaLoaded = true;
}
window.setTimeout(function () {
if (!window.reCaptchaLoaded) {
document.getElementById('norecaptcha').value = true;
document.getElementById('captcha-form').submit();
}
}, 5000);
</script></head><body><main class="zsg-layout-content"><div class="error-content-block"><div class="error-text-content"><!-- <h1>Captcha</h1> --><h5>Please verify you're a human to continue.</h5><div id="content" class="captcha-container"><form method="POST" action="" id="captcha-form"><script type="text/javascript">
var RecaptchaOptions = {"theme":"white","lang":"en-US"};
</script>
<script type="text/javascript" src="http://www.google.com/recaptcha/api.js" async defer onload="onReCaptchaLoad()"></script>
<div class="g-recaptcha" data-sitekey="6Lf2nvMSAAAAAMQ5p6WlAfDEixMdOQgJsij-3_ud"></div><br/><input id="dest" name="dest" type="hidden" value="ognl:originalDestination"/><input id="norecaptcha" name="norecaptcha" type="hidden" value="false"/><button type="submit" class="zsg-button zsg-button_primary">Submit</button></form><img src="http://www.zillowstatic.com/static/logos/logo-65x14.png" width="65" alt="Zillow" height="14"></img></div></div></div></main></body></html><!-- H:017 T:0ms S:1554 R:Tue Dec 27 12:25:35 PST 2016 B:5.0.37586-master.3e1733a~hotfix_pre.27ccd5e -->