ich spiele gerade mit requests und bs4 herum und habe folgendes Script einmal aus der Python Konsole und einmal aus der IPython Konsole gestartet.
Code: Alles auswählen
if __name__ == '__main__':
pass
import requests
import bs4
adresse3 = "https://www.springerprofessional.de/im-fokus-automobil-motoren/47326"
res = requests.get(adresse3)
soup = bs4.BeautifulSoup(res.text, 'html.parser')
print(soup.prettify())
print(res.text)
IPython: Skript läuft ohne Murren durch
Python: Fehlermeldung
Code: Alles auswählen
Traceback (most recent call last):
File "C:\Users\Bowie\Documents\30_DEV\10_Python\web_scraping\src\htmls_auswerten.py", line 19, in <module>
print(soup.prettify())
UnicodeEncodeError: 'latin-1' codec can't encode character '\u25bc' in position 15650: ordinal not in range(256)
Ich arbeite unter Win10 + Anaconda mit Python 3.5.2 und IPython 5.1.0
Danke!
Gruß
Marcus