Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question