import requests

url = 'https://www.gutenberg.org/files/345/345-h/345-h.htm'
response = requests.get(url, timeout=10)
print(response.status_code)
response.raise_for_status()
response.encoding = 'utf-8'
print(type(response.text))

with open('dracula.html', 'w', encoding='utf-8') as f:
    f.write(response.text)
print('Saved dracula.html')
