1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00
elinks/contrib/python/lp3.py

12 lines
265 B
Python
Raw Normal View History

import re
2009-02-08 12:10:17 -05:00
PATTERN = re.compile('<a href="javascript:void\(null\);" onclick="\s*play\(this,\'(http://lp3.polskieradio.pl/_files/mp3/.*mp3)\'\);\s*">')
def zamien(m):
return '<a href="' + m.group(1) + '">'
def lp3(html):
return PATTERN.sub(zamien, html)