I\'m learning Python by following Automate the Boring Stuff. This program is supposed to go to http://xkcd.com/ and download all the images for offline viewing.
I\'
Actually this is not a bigdeal.you can see the comicUrl somewhat like this //imgs.xkcd.com/comics/acceptable_risk.png
The only thing you need to add is http: , remember it is http: and not http:// as some folks said earlier because already the url contatin double slashes.
so please change the code to
res = requests.get('http:' + comicElem[0].get('src'))
or
comicUrl = 'http:' + comicElem[0].get('src')
res = requests.get(comicUrl)
Happy coding