urllib HTTPS request:

后端 未结 5 2051
太阳男子
太阳男子 2020-12-01 16:30

I have a script on python3.4 and it has been fine until the website I download the file from decides to use https and now I am getting error but can\'t figure out how I can

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 17:03

    for HTTP
    people who encountered the error ValueError: unknown url type: 'http or ValueError: unknown url type: b'http

    while opening some url like below with urllib.request.Request 'http://localhost/simple_form/insert.php'

    just change localhost to 127.0.0.1

    looks like Request method is looking for a domain.something in url

提交回复
热议问题