コード例 #1
0
ファイル: document.py プロジェクト: matthiase/bitbucket
 def from_url(url, xpath=None):
   response = urllib2.urlopen(url)
   content = response.read()
   text = html.clean(content, xpath)
   return Document(text)
コード例 #2
0
ファイル: document.py プロジェクト: matthiase/bitbucket
 def from_html(content, xpath=None):
   text = html.clean(content, xpath)
   return Document(text)