今天突然发现获取微信头像出现了超时问题
requests.get('http://wx.qlogo.cn/mmopen/0wR...')
我在本地没有问题。
但是在服务器却有问题,这个代码会一直卡住。有人知道什么原因吗?
是不是下载图片需要开启某个端口呀!!有人知道是什么端口吗?
大家讲道理2017-04-18 10:14:00
You can log in to that server first and use the requests library to get it manually. If it doesn’t work, try “2”
wget that picture, if not, try "3"
The picture resource is on the http server. You can ping "wx.qlogo.cn" now. Judging from the domain name, it should be the domain name of WeChat. There may be no problem. Then telnet wx.qlogo.cn 80 on the server. If it still doesn't work, it means there is a problem with the network. You can check the firewall information of this server.