设置位置后刮谷歌

2024-04-20 04:29:43 发布

您现在位置:Python中文网/ 问答频道 /正文

首先,我想指出的是,我的目标不是成千上万的结果,我只对第一页的数据感兴趣。你知道吗

我曾尝试使用mechanize在首选项中设置位置,但总是出现错误。你知道吗

br.open('https://www.google.ca/preferences?hl=en-CA&fg=1#location')

br.select_form(nr=0)
br.form['luul'] = 'Toronto, Canada'

resp = br.submit()

我得到全局首选项页面,出现以下错误:

The location Toronto, Canada was not recognized.

我试图查询https://www.google.ca/preferences?hl=en&muul=4_20&luul=Toronto,+Canada&prev=https://www.google.ca&gbv=1&sei=XXX,但没有成功。你知道吗


Tags: httpsbrformwww错误googlelocationhl