import requests url = 'http://xxxx' html = requests.get(url) with open('cha.jpg', 'wb') as f: f.write(html.content)