#NEWLINE# @ staticmethod #NEWLINE# def get_top_stories( topic ) : #NEWLINE# #INDENT# url = ( ( 'http://www.quora.com/' + topic ) + '/rss' ) #NEWLINE# f = feedparser . parse ( url ) #NEWLINE# feed_len = len ( f . entries ) #NEWLINE# links = [ ] #NEWLINE# title = [ ] #NEWLINE# published = [ ] #NEWLINE# for i in range ( feed_len ) : #NEWLINE# #INDENT# links . append ( f [ 'entries' ] [ i ] [ 'links' ] [ 0 ] [ 'href' ] ) #NEWLINE# title . append ( f [ 'entries' ] [ i ] [ 'title' ] ) #NEWLINE# published . append ( f [ 'entries' ] [ i ] [ 'published' ] ) #NEWLINE# #UNINDENT# dict = { #NEWLINE# #INDENT# 'links' : links , #NEWLINE# 'title' : title , #NEWLINE# 'published' : published , #NEWLINE# #UNINDENT# } #NEWLINE# return dict