今天我可以使用谷歌的专利代码
import urllib2
url = 'http://www.google.com/search?tbo=p&q=ininventor:"John-Mudd"&hl=en&tbm=pts&source=lnt&tbs=ptso:us'
req = urllib2.Request(url, headers={'User-Agent' : "foobar"})
response = urllib2.urlopen(req)
现在当我运行它时,我得到了下面的503错误。我只在上面循环了大概30次代码(我试图获得30个人的所有专利)。在
^{pr2}$
暗中射击猜测:
您是否查看了响应中是否有“Retry After header”。503的确有可能。在
From RFC 2616:
不幸的是,谷歌的TOS禁止自动查询。几乎可以肯定的是,它发现你“做得不好”
来源:https://support.google.com/websearch/answer/86640?hl=en
相关问题 更多 >
编程相关推荐