我一直在使用 GetSearchResults Web 服务,但它突然停止工作,因为它要求我响应验证码,这没有任何意义,因为它是一个 API,所以它不应该要求人工响应。
此代码在 Google App Engine 中运行。在本地主机上它工作正常,但在生产中失败。
下面显示了我的代码试图获取的内容。即将到来的 HTML 包含验证码。我应该取回 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 -->