Extract email address from Java script in html source using python

savitha devi savithad8 at gmail.com
Sat May 23 02:46:06 EDT 2015


I am developing a web scraper code using HTMLParser. I need to extract
text/email address from java script with in the HTMLCode.I am beginner
level in python coding and totally lost here. Need some help on this. The
java script code is as below:

<script type='text/javascript'>
 //<!--
 document.getElementById('cloak48218').innerHTML = '';
 var prefix = 'ma' + 'il' + 'to';
 var path = 'hr' + 'ef' + '=';
 var addy48218 = 'info' + '@';
 addy48218 = addy48218 + 'tsv-neuried' + '.' +
'de';
 document.getElementById('cloak48218').innerHTML += '<a ' + path +
'\'' + prefix + ':' + addy48218 + '\'>' + addy48218+'<\/a>';
 //-->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150523/8f56c3e4/attachment.html>


More information about the Python-list mailing list