Index: contrib/rcast.py ================================================================== --- contrib/rcast.py +++ contrib/rcast.py @@ -1,11 +1,12 @@ +# encoding: utf-8 # api: streamtuner2 # title: RCast # description: Streaming server provider and station directory # type: channel # category: radio -# version: 0.2 +# version: 0.3 # url: http://www.rcast.net/dir # png: # iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABH0lEQVR42mPgZWXkNxdhsScH87Iw8DOAGHcDBf6Tg02FmW1RDPj97cvf/0BwJ4D/HyHNGAbc9uUBawaBf0BASDOGASBNIM1fHt34BaKRFd4CGg4C # eA0Agd9fPv255c39F90AXC6DG3ArSOwP1O9wDTc92cA23gqR/g3i3yvz/IFuMNgAeyBANx0Enk7M+Qlig5wO0wgCt1yZwepuBQj8sQUCsAG/3r74g+7k318//oWxYYaDwM/3r//A2GADsKUDGICxH7XG/wK75s8f # cEB/vnwU7C2MdADDn2+d+4VsADCKIc72ZPsHM/zvn99/cRpw050Z7O+nvVkYUfpmx4KfMDGcBiB7A90AZIzXgJ9vX4D9eceP9x9ZBhCDwQZQmp0BVv4354bQNGwAAAAASUVORK5CYII= @@ -62,14 +63,14 @@ # extract ls = re.findall(""" .*? .*? ([^<>]+) .*? - ([^<>]*) .*? - ]+>([^<>]*) .*? - Genre:(.+?) .*? - \s*(\d+)\s*Kbps
\s*(audio/[\w.-]+) + ]*>([^<>]*) .*? + ]+>([^<>]*) .*? + Genres?:(.+?)
.*? + ]*>\s*(\d+)\s*Kbps """, html, re.X|re.S) #log.DATA(re.findall("()", html)) # blocks for row in ls: @@ -79,13 +80,13 @@ id = row[0], url = row[1], title = unhtml(row[2]), playing = unhtml(row[3]), homepage = unhtml(row[4]), - genre = unhtml(row[5]), + genre = unhtml(strip_tags(row[5])), bitrate = to_int(row[6]), - format = row[7], + #format = row[7], #listeners = to_int(listeners[5]) )) except: pass #some field missing