repo.or.cz
/
elinks
/
images.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[wip] show_image(): Introduce struct screen_image with complete but abstract on-scree...
[elinks/images.git]
/
contrib
/
python
/
lp3.py
blob
0cdcf80ef84feab7d47515798aa4ca9253ad455c
1
import
re
2
3
PATTERN
=
re
.
compile
(
'<a href="javascript:void\(null\);" onclick="\s*play\(this,
\'
(http://lp3.polskieradio.pl/_files/mp3/.*mp3)
\'
\);\s*">'
)
4
5
def
zamien
(
m
):
6
7
return
'<a href="'
+
m
.
group
(
1
) +
'">'
8
9
def
lp3
(
html
):
10
11
return
PATTERN
.
sub
(
zamien
,
html
)