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