Esempio n. 1
0
 def from_url(url, xpath=None):
   response = urllib2.urlopen(url)
   content = response.read()
   text = html.clean(content, xpath)
   return Document(text)
Esempio n. 2
0
 def from_html(content, xpath=None):
   text = html.clean(content, xpath)
   return Document(text)