5

Code:

img=requests.get('http:////files.explosm.net/comics/Rob/chainsaw.png')

Error Message:

requests.exceptions.InvalidURL: Invalid URL u'http://files.explosm.net/comics/Rob/chainsaw.png': No host supplied

What's wrong with the url? files.explosm.net/comics/Rob/chainsaw.png

1 Answer 1

13

You have a few too many '/'s in the URL:

img = requests.get('http://files.explosm.net/comics/Rob/chainsaw.png')

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.