Looking for Python code to obsfucate mailto links on web site

Andrew McLean andrew-news at andros.org.uk
Sun Jun 25 16:10:31 EDT 2006


I'm looking at putting some e-mail contact addresses on a web site, and 
wanted to make it difficult for spammers to harvest them.

I found some Python code that I can call within my application.

http://www.zapyon.de/spam-me-not/

It works exactly as expected. However, I am concerned that the technique 
used for obsfucating the e-mail address may be a bit weak.

Searching the web it looks like the best solution for me might be to 
embed JavaScript in the web page that dynamically generates the e-mail 
address in the browser client.

I've found on-line tools that will generate suitable JavaScript, but 
need to automate the "encoding" process in Python.

Now I could write suitable code myself, but would be surprised if it 
wasn't already available. Any pointers?

To head of a few comments I'm anticipating ;-)
- no I don't want to use a contact form
- accessibility is an issue, but I'm also including postal addresses and 
phone numbers giving alternatives to e-mail. Also the main enquiry 
address won't be obfuscated.



More information about the Python-list mailing list