def feddretreive(self): # NON IN USO """Carica il feed RSS WARNING: attualmente non in uso """ d = feedparser.parse("http://www.promogest.me/newsfeed") Environment.feedAll = d return
def getfeedFromSite(): string = "" if Environment.feedAll == "": d = feedparser.parse("http://www.promogest.me/newsfeed") else: d = Environment.feedAll feedList = d['entries'] feedToHtml = [] for feed in feedList[0:3]: try: body = feed['content'][0]['value'] except: body = feed["summary_detail"]['value'] feed = { "title" :feed['title'], "links": feed['links'][0]['href'], "body" : body, "updated" : feed['updated'][4:-13], "autore" : feed['author'] } feedToHtml.append(feed) Environment.feedCache = feedToHtml renderPage(feedToHtml)