Index: contrib/streema.py ================================================================== --- contrib/streema.py +++ contrib/streema.py @@ -1,11 +1,11 @@ # api: streamtuner2 # title: Streema # description: # type: channel # category: radio -# version: 0.1 +# version: 0.2 # url: http://www.streema.com/ # png: # iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABF0lEQVR42oWTMWsCURCE/Y/Bxh+QLrUIloKdELCxTOOBRSSgpZVYhCAWCtcEETGQJmCTkG7k47HcereeA4vnu32zszt7jceRFMXDQGoN # pd40RXci9d+kpxep+VzkNaLLXBzMpe1R+vu/jq8fabxKOSEBL6YfqgVEnSwgsMoen9+JcJlL5990xv9QAYf5qbhMC/RrQf/trLgctoA8A/0yPCO38PkVApPpAdFsndyoJeDlaKFarPZ3FJj3i12qHIEh # sichgSfi18j8bHDmpgvlQfFMNe/O5hAoMOnMoJMVRNjHCnsFbGKFgCl7IJPloZoHLrEPlRYi+8ogh724uUiv72ny0QeEQl+5QmDDIomeLVhdzuzzLrt1AQVnVKF/yji7AAAAAElFTkSuQmCC @@ -58,21 +58,21 @@ def update_streams(self, cat, search=None): r = [] if cat: html = ahttp.get(self.base + "/genre/" + cat) elif search: - html = ahttp.get(self.base + "/search/?q=" + cat) + html = ahttp.get(self.base + "/search/?q=" + search) else: return # split into blocks for html in re.split(']+class="item"', html): # not very efficient url = re.findall('data-url="/radios/play/(\d+)"', html) homepage = re.findall('data-profile-url="/radios/(.+?)"', html) - title = re.findall('title="(.+?)"', html) + title = re.findall('title="Play (.+?)"', html) img = re.findall('(.*?)', html, re.S) genre = re.findall('

(.*?)

', html, re.S) listeners = re.findall('

(\d+) Listen\w*s

', html)