Fetch a file from a local url with Python requests?

后端 未结 6 1242
误落风尘
误落风尘 2020-12-02 14:29

I am using Python\'s requests library in one method of my application. The body of the method looks like this:

def handle_remote_file(url, **kwargs):
    res         


        
6条回答
  •  爱一瞬间的悲伤
    2020-12-02 15:10

    packages/urllib3/poolmanager.py pretty much explains it. Requests doesn't support local url.

    pool_classes_by_scheme = {                                                        
        'http': HTTPConnectionPool,                                                   
        'https': HTTPSConnectionPool,                                              
    }                                                                                 
    

提交回复
热议问题