I'm having troubles finding the content of HTML forms (or any other tag for that matter). I've tried
forms = re.findall('<form.*/form>', htmltext)
but with no results. Where's the mistake?
I'm having troubles finding the content of HTML forms (or any other tag for that matter). I've tried
forms = re.findall('<form.*/form>', htmltext)
but with no results. Where's the mistake?
Unless the form was on one line, that won't work, you need re.DOTALL as an option
forms = re.findall('<form.*/form>', htmltext, re.DOTALL)
You could use re.IGNORECASE | re.DOTALL in case you need to catch something like <Form ...