[ Web Proxy ]
URL:
Viewing: https://wiki.python.org/moin/../python/platforms/../web/../../python/archive/ReadingHtmlForms.html [Back]  [Original]

Reading HTML Forms - Python Wiki
Python Wiki
psf/wiki 0 0
Copy page

Reading HTML Forms

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

A friend of mine recently asked, Is there anything in Python that can read forms?

Hes got perl code that looks like this:

        my $form = HTML::Form->parse($writeFormPage, $res->base());
        defined($form) or return "Can't even get wiki edit form at $URL";
    if ($form->find_input('savetext')) {
        $form->value('savetext',$pagetext);
    }
        my $req = $form->click('button_save');
        my $res = $ua->request($req);

I thought, cgi module, but realized its for writing pages, not reading them. Then I thought urllib, but didnt see anything very promising over there, either.

Does anyone know of Python code or a Python module that will help you read out forms, and create responses to them?

StefanBehnel

lxml.html has pretty sophisticated HTML form support.

LionKimbro 2004-06-03 07:39:12

Look at:


CategoryFaq

Back to top

Web Proxy Viewer  |  New URL  |  Original Page