From 096d4db6ce05b25191f39cc2755ae926658ee342 Mon Sep 17 00:00:00 2001 From: Yuri Baburov Date: Tue, 14 Jun 2011 04:33:15 -0700 Subject: [PATCH] Added usage --- README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README b/README index f872ae6..235c216 100644 --- a/README +++ b/README @@ -13,3 +13,10 @@ Based on: - Ruby port by starrhorne and iterationlabs - Python port by gfxmonk ( https://github.com/gfxmonk/python-readability , based on BeautifulSoup ) - Decruft effort to move to lxml ( http://www.minvolai.com/blog/decruft-arc90s-readability-in-python/ ) + +Usage: + + import urllib + html = urllib.urlopen(url).read() + readable_article = Document(html).summary() + readable_title = Document(html).short_title()