python - requests下载图片出错超时?
黄舟
黄舟 2017-04-18 10:12:00
0
1
633

今天突然发现获取微信头像出现了超时问题

requests.get('http://wx.qlogo.cn/mmopen/0wR...')

我在本地没有问题。
但是在服务器却有问题,这个代码会一直卡住。有人知道什么原因吗?
是不是下载图片需要开启某个端口呀!!有人知道是什么端口吗?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
大家讲道理
  1. You can log in to that server first and use the requests library to get it manually. If it doesn’t work, try “2”

  2. wget that picture, if not, try "3"

  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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!