[Tutor] Have Python Update Forms

James jtp at nc.rr.com
Fri Jun 6 14:58:25 CEST 2008

Thanks for the response.

Ahhh, now we're going to get really off-topic. ;)

The only one that I've been able to scrape up for now was the infamous
DOM Inspector. Using the DOM Inspector, I can see:

- action ('/tool/update/todoUpdate.do')
- method is post
- name is 'todo'

There's a specific input (of type text). In fact, when I look at the
details for this field, I see:
- type (text)
- class (text)
- value (this is what I want to change)
- size
- maxlength
- name (lastUpdate)

Is this all the information I need to actually interact directly with
the webserver using Python to mimic POST functionality?

Also, are there any specific keywords I should be looking for in terms
of Firefox extensions to help me with whipping up a dirty hack like
this? :)


On Thu, Jun 5, 2008 at 8:43 PM, Kent Johnson <kent37 at tds.net> wrote:
> On Thu, Jun 5, 2008 at 1:56 PM, James <jtp at nc.rr.com> wrote:
>> I want to write a program that will update the 'last updated' field on
>> *every* item. This will require some sort of 'post' to the web server
>> and interaction with the existing web tools and its back-end. I can
>> probably whip up a program (using the advice Kent gave yesterday in a
>> thread on this mailing list :)) to gather the entire list of items
>> that needs to be modified (all the to-do list item numbers, that is).
>> I'm not sure, however, how to mimic manually updating the last-updated
>> field.
> You have to find out how the browser talks to the backend. Most likely
> it is a POST with the form data. If so, you can simulate this in
> Python. See the section on POST here:
> http://personalpages.tds.net/~kent37/kk/00010.html
> There are various complications - authentication, hidden fields and
> JavaScript, for example - but essentially you want to write a Python
> program that mimics the interaction the browser has with the server.
> Tools that let you inspect the browser interaction are very helpful
> but I will leave you to ferret those out yourself. There are Firefox
> plugins that will do that.
> Kent

More information about the Tutor mailing list