Best way to find forms on a webpage with make?

Hi all,

I’d like to know the best way to find forms (get the HTML content of the forms) of a webpage? Which node can I use?

The alternative could be to use beautifulsoup in Python but I’d like to know if there is a way to do that with Make nodes?

Note that forms can look like this too:

<div class="novaform form" id="myform" novamailto="9f_L2243ETr19XVSgNWjF5EIyuvvA8BMrfpJ89SVgsI"> <input type="hidden" name="mailsubject" value="Hotel Silky Contact form"> <input type="hidden" name="formname" value="Formulaire de contact"> <input type="hidden" name="formpage" value="contact.html"><input displayname="Name" type="text" class="text" placeholder="Prénom &amp; Nom" value="" initialvalue=""> <input displayname="Email" type="text" class="text" placeholder="E-mail" value="" initialvalue=""><textarea displayname="Message" type="text" class="form-message" placeholder="Message" wrap="virtual autoempty"></textarea><label> <input displayname="Newsletter" type="checkbox" class="form-checkbox"><span>Oui, je souhaiterais recevoir les offres spéciales et newsletters par email</span> </label><div id="mysubmit" class="btn">ENVOYER</div></div>

Thanks!

Hi @yddddd,

This will be difficult to do it through Make, Mainly due to the fact that there is no way to extract particular HTML tags through Make. You can check the Text Parser Module for available modules to interact with HTML.

You can go through Regular Expression route, although I don’t recommend doing that for HTMLs.

1 Like