Why am I getting this error in python ? (httplib)

后端 未结 10 1681
情话喂你
情话喂你 2020-11-27 20:11
if theurl.startswith(\"http://\"): theurl = theurl[7:]
    head = theurl[:theurl.find(\'/\')]
    tail = theurl[theurl.find(\'/\'):]
response_code = 0
import httplib         


        
10条回答
  •  暖寄归人
    2020-11-27 20:28

    I know that "you should just use X" answers are frowned upon, but I have to say that after trying to diagnose this same problem for a couple hours I tried Requests with the same set up and it worked perfectly. Easier to use and debug in my opinion as well.

提交回复
热议问题