def loadFeedInformationToDatabase(settings,allCats): # Put feed information in database database = FeedDatabase(settings['database']) counter = 0 size = len(allCats) for elem in allCats.keys(): sys.stderr.write('...Uploading... ({0}/{1})\n'.format(counter,size)) title = allCats[elem]['title'] guid = elem description = allCats[elem]['description'] categry = allCats[elem]['category'] database.add_feed_element(title,guid,description,categry) counter +=1 sys.stderr.write('...Finished Uploading Information to Database\n') database.close_database()