From 16713e6d2a3a0ee241fe2f79a79b0e534701eb1c Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 21 May 2014 15:05:35 +0200 Subject: [PATCH] Fix README sample python code --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d22dbbe..b7e3408 100644 --- a/README.md +++ b/README.md @@ -99,19 +99,16 @@ However here is a quick draft of what your code should you like if you intend to ```python import morss + url = 'http://newspaper.example/feed.xml' options = morss.ParseOptions() # there's no easy way to pass arguments by hand from python so far... cache_path = '/tmp/morss-cache' # cache folder, needs write permission url, cache = Init(url, cache_path, options) -RSS = Fetch(url, cache, options) # this only grabs the RSS feed -RSS = Gather(RSS, url, cache, options) # this fills the feed and cleans it up -After(RSS, options) # formats final feed +rss = Fetch(url, cache, options) # this only grabs the RSS feed +rss = Gather(rss, url, cache, options) # this fills the feed and cleans it up -output_xml = rss.tostring(xml_declaration=True, encoding='UTF-8') -output_json = rss.tojson() -output_json_indented = rss.tojson(indent=4) -output_csv = rss.tocsv() +output = After(rss, options) # formats final feed ``` ##Cache information