N
N
Nikolai Sidorenko2014-11-24 16:44:05
Python
Nikolai Sidorenko, 2014-11-24 16:44:05

What modules for python do I need?

Because now I'm studying python, could advise modules, show an example), to implement this algorithm:
copy data line by line from one file,
paste this data into an html form,
press the button
, return the answer
, that's all)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lPolar, 2014-11-24
@NSidorov

A simple solution is the standard python i/o+grab for forms and results.

from grab import Grab
g=Grab()
infile=open('test.txt','r')
inputs=[line for line in infile.readlines().split('\n')]
for input in inputs:
    try:
        g.go('www.some.site.com')
        g.form_fields('form1',input)
    except:
        print('Ой, все')
    if g.response.code==200:
        body=g.response.body

An offhand example may not work, but the general idea is this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question