Apr-05-2021, 12:58 AM
(Apr-05-2021, 12:46 AM)Kingoman Wrote: What is wrong here?You can not do it like that,and code you have gotten work.
So could add some code so it save as a .html file.
import requests domains = ['https://webdesigner.dk', 'https://www.dk4.dk/item/4128-persondatapolitik'] for domain in domains: print(domain) response = requests.get(domain) print(f"Response data length: {len(response.text)}") # Remove # from line below to see source # print(response.text) with open('source.html', 'w') as f: f.write(response.text.strip())