I have coded the following quick example to learn some of the basics of requests and Beautifulsoup.
import requests
from bs4 import BeautifulSoup
requests
url = 'http://www.tagesschau.de'
r = requests.get(url)
r_html = r.text
soup = BeautifulSoup(r_html, 'html.parser')
soup_prettified = soup.prettify()
with open('text_test_1.html','w') as open_file:
open_file.write(soup_prettified.encode('ascii', 'replace'))
Everything works fine, but when I open the HTML, it does really not look like the original webpage. It is more a list of links. Why is that? How can I really have like a picture of the original webpage?
It is not the same question as the one marked as duplicate, since I don't want to save just the HTML.