Thanks to this script:
import requests
from bs4 import BeautifulSoup
import urllib2
import sys
import urlparse
import io
url = "anUrl"
r = requests.get(url)
soup = BeautifulSoup(r.text,'lxml')
div = soup.find('div',id='content')
print div.prettify().encode(sys.stdout.encoding, 'ignore')
i've scraped some content that i want to print into another html page, trough javascript how can i handle the python output? Is it possible to print the content in the same way i've done in command line, with a browser page? I've got some encoding problems trying to do that.