87
88
89
90
91
92
93
94
95
96
97
98
99
100
101 |
# Fetch OPML, convert outline elements to dicts
def api(self, method):
r = []
# fetch API page
next = self.base + method
max = int(conf.radiotime_maxpages)
while next:
opml = ahttp.get(next)
next = None
x = ElementTree.fromstring(opml)
# append entries
for outline in x.findall(".//outline"):
outline = dict(outline.items())
# additional pages |
>
>
>
| 87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 |
# Fetch OPML, convert outline elements to dicts
def api(self, method):
r = []
# fetch API page
next = self.base + method
max = int(conf.radiotime_maxpages)
i = 0.1
while next:
self.status(i / (12.5 + max * 0.7))
i += 1.1
opml = ahttp.get(next)
next = None
x = ElementTree.fromstring(opml)
# append entries
for outline in x.findall(".//outline"):
outline = dict(outline.items())
# additional pages |