Skip to content

Commit

Permalink
added json
Browse files Browse the repository at this point in the history
  • Loading branch information
kaflesudip committed Jun 9, 2014
1 parent fcffe3e commit 5a57d80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions grabfeed/grabber.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ def return_rss(page_url):
return rss_link


def return_content(page_url, return_type='dict'):
def return_content(page_url, return_type='json'):
rss_page_url = return_rss(page_url)
page_content = return_page_content(rss_page_url).read()
if return_type == 'xml':
return page_content
else:
content = xmltodict.parse(page_content)
return content

print return_content('http://blog.flipkarma.com')

0 comments on commit 5a57d80

Please sign in to comment.