How to send http request without scheme in python? -


enurl='res.iweshow.com' sr = requests.get(enurl) print(sr) 

when send http request using requests module in python, here traceback:

raise invalidschema("no connection adapters found '%s'" % url)requests.exceptions.invalidschema: no connection adapters found 

if intention use http, indicated in question, answer "add http scheme in".

use urlparse check if scheme absent url.

in case of proxy, default scheme http see here , here


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -