我试图从 python 访问维基百科页面
a = urllib2.urlopen("http://en.wikipedia.org/wiki/LALR_parser")
这导致了一个错误
<urlopen error [Errno 101] Network is unreachable>
所以我尝试了
req = urllib2.Request(url, headers={'User-Agent' : "MyBrowser"})
a = urllib2.urlopen(req)
我仍然得到同样的错误
现在我无法在 chrome 或 firefox 中查看维基百科..它说“chrome 找不到该页面”
但是如果我在匿名代理中输入维基百科 url,页面显示没有任何问题
你认为是什么问题?我的IP被封锁了吗?我检查了防火墙(在 ubuntu lucid 中)
sudo ufw status
Status: inactive
我也试过
sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
有人可以帮忙吗?