101
102
103
104
105
106
107
108
109
110
|
<p.*?>(.+?)</p> .*?
href="(http://somafm.com/.+?.pls)" .*?
""", html, re.X|re.S)
rows = [
dict(genre=g, title=t, playing=p, url=u, listeners=int(l), bitrate=128, homepage=re.sub("\d*\.pls$", "/", u))
for l,g,t,p,u in ls
]
#print rows
return rows
|
|
|
101
102
103
104
105
106
107
108
109
110
|
<p.*?>(.+?)</p> .*?
href="(http://somafm.com/.+?.pls)" .*?
""", html, re.X|re.S)
rows = [
dict(genre=g, title=t, playing=p, url=u, listeners=int(l), bitrate=128, homepage=re.sub("\d*\.pls$", "/", u))
for l,g,t,p,u in ls
]
#log.DATA(rows)
return rows
|