ref: bb4d0980dad80279523bb17162ea0e7eace4325a radiogopher/__main__.py -rwxr-xr-x 413 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3
import sys
import collector
import exceptions

for feed in collector.get_feeds():

    try:
        feed = collector.parse_feed(feed)
    except exceptions.FeedUrlError as e:
        print("Failed to parse feed {} ({})".format(feed, e))
        continue

    try:
        medias = collector.extract_media(feed)
    except exceptions.NoEntriesError as e:
        # empty feed?
        pass