urllib.py doesn't work with https?

后端 未结 3 1966
醉梦人生
醉梦人生 2021-01-03 05:43

In my python app I try to open a https url, but I get:

 File \"C:\\Python26\\lib\\urllib.py\", line 215, in open_unknown
    raise IOError, (\'url error\', \         


        
3条回答
  •  萌比男神i
    2021-01-03 06:13

    Try using urllib2 instead.

    I had the same issue with urllib on OSX 10.6 using python 2.6.6 from macports. Switching to urllib2 fixed it.

提交回复
热议问题