
Deswegen versuche ich es mit einer RE, aber es klappt nicht richtig:
Code: Alles auswählen
import re
txt = """...</form>
</fieldset>
<script language="javascript" type="text/javascript" src="/media/PyLucid/sha1.js"></script>
<script type="text/javascript">
debug_msg = true;
salt = 'dfe08';
challenge = 'debug';
submit_url = '.';
focus_id = 'plaintext_pass';
init();
</script>
</div>
<p id="footer">
powered by <a href="http://www.pylucid.org">PyLucid v0.8.0 alpha3SVN</a> | <a href="/_command/1/auth/login/">Log in</a> | Rendered in render time: 0.223 - overall: 0.2 - Queries: 16 sec. | last modified: 2007-06-26 01:30:09
</p>"""
regex = re.compile(r'<script [^>]+?(.+?)<\/script>(?uimx)')
print regex.findall(txt)
Code: Alles auswählen
debug_msg = true;
salt = 'dfe08';
challenge = 'debug';
submit_url = '.';
focus_id = 'plaintext_pass';
init();
