From 2c14587b88aaa8efa744b15af242e8de9193ca8c Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 8 Feb 2009 17:49:33 +0100 Subject: [PATCH] Added the lp3.py to let elinks users listen to the lp3. --- contrib/python/hooks.py | 4 ++++ contrib/python/lp3.py | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 contrib/python/lp3.py diff --git a/contrib/python/hooks.py b/contrib/python/hooks.py index 28cbf32b..ffb6e1d1 100644 --- a/contrib/python/hooks.py +++ b/contrib/python/hooks.py @@ -24,6 +24,7 @@ quit_hook() -- Clean up before ELinks exits. """ import elinks +from lp3 import lp3 dumbprefixes = { "7th" : "http://7thguard.net/", @@ -96,6 +97,9 @@ def pre_format_html_hook(url, html): elif url.startswith("https://www.mbank.com.pl/ib_navibar_3.asp"): return html.replace('') + +def zamien(m): + + return '' + +def lp3(html): + + return PATTERN.sub(zamien, html)