I want to scrape some contents from a webpage, this is the code:
import requests from bs4 import BeautifulSoup import urllib2 url = "anUrl" r = requests.get(url) soup = BeautifulSoup(r.text,'lxml') print soup.prettify() This is the error description: unicodeencodeerror: 'charmap' codec can't encode character u'\u2013' in position :character maps to undefined
This kind of error should depends about different characters, not ever the same, so i need a generic solution.
printoutput going?printanymore, correct?