Why does Google Search return HTTP Error 403?

前端 未结 4 492
鱼传尺愫
鱼传尺愫 2020-12-05 11:02

Consider the following Python code:

 30    url = \"http://www.google.com/search?hl=en&safe=off&q=Monkey\"
 31    url_object = urllib.request.urlopen(url);
 32             


        
4条回答
  •  情歌与酒
    2020-12-05 11:43

    You're doing it too often. Google has limits in place to prevent getting swamped by search bots. You can also try setting the user-agent to something that more closely resembles a normal browser.

提交回复
热议问题