-1
enUrl='res.iweshow.com'
sr = requests.get(enUrl)
print(sr)

When i send http request using requests module in python, here is the traceback:

raise InvalidSchema("No connection adapters were found for '%s'" % url)requests.exceptions.InvalidSchema: No connection adapters were found for

1 Answers1

0

If your intention is to use HTTP, as indicated in the question, then the answer is simply "add the HTTP scheme in".

Use urlparse to easily check if the scheme is absent from the url.

In the case of a proxy, the default scheme is now http see here and here

Community
  • 1
  • 1
Pynchia
  • 10,996
  • 5
  • 34
  • 43