from feedparser import parse from csvparser.csvparser import getfieldsofinterest, getfullpublication feed = parse("http://varia.zone/en/feeds/all-en.rss.xml") def getentries(): entries = {} for entry in feed.entries: if "readrepair" in entry.category: entries[entry.title] = entry.description return entries def gettitles(): titles = [] for entry in feed.entries: if "readrepair" in entry.category: titles.append(entry.title) return titles def rabbithole(entry): pubtitles = [] fieldsofinterest = getfieldsofinterest() entry = entry.lower() for id, fields in fieldsofinterest.items(): if [f for f in fields if(f.lower() in entry)]: publicationinfo = getfullpublication(id) pubtitle = publicationinfo["Title"] pubtitles.append(pubtitle) return pubtitles def getevents(): events = getentries() for entry in events: titles = rabbithole(entry) print(titles) return events # print(rabbithole())