Python: requests.exceptions.ConnectionError. Max retries exceeded with url

后端 未结 3 1402
情歌与酒
情歌与酒 2020-12-25 11:11

This is the script:

import requests
import json
import urlparse
from requests.adapters import HTTPAdapter

s = requests.Session()
s.mount(\'http://\', HTTPAd         


        
3条回答
  •  没有蜡笔的小新
    2020-12-25 11:36

    def hello(self):
        self.s = requests.Session()
        self.s.headers.update({'User-Agent': self.user_agent})
        return True
    

    Try this,It worked for me :)

提交回复
热议问题