def main():
    show = load_show('Loveline')  # return PodcastFeed object
    archive = return_archive('Loveline')

    while True:
        try:
            episode_data = archive.get(show.date)
        except EpisodeNotFoundException:
            show.next_date()
            continue
        else:
            description = episode_data['description']
            pub_date = episode_data['date']
            title = '{} ({})'.format(episode_data['guest'], pub_date.strftime('%a, %b %d %Y'))

            show.append_item(title=title, description=description, pub_date=pub_date, network_path=episode_data['mp3'])
            show.publish()
            break
Exemple #2
0
 def setUp(self):
     self.test_show = feeds.load_show('Loveline')