UGN Security

Python 3 issue

Posted By: Testing

Python 3 issue - 12/18/11 04:28 AM

Currently I am trying to write a script that will submit a value to a form and capture the information received. I then of course need to parse it.

My main issue I am having is actually submitting the form. I have my data I need submitted (a list of entries one at a time). I just have no clue on how to actually submit the form.

Any thoughts? I have been researching the heck out of urllib.request and urlopen but I just seem to be missing something. any help is appreciated!

Here is a copy of what i have so far.. but I haven't actually put in the code for connecting to the website.

the idea is i have a csv file of addresses and i need the program to take each one and submit it in a form. heres what I have as a start.

#Creates a list for the addresses to go into
addresslist = []

#Opens the file
file = open('DealList.txt', 'rt')

#Creates the vareiable "x" which contains every line in the file
x = file.readlines()

#Strips the useless information and the double quotes from the original line
#and adds it into "addresslist"
for line in x:
#Adds the address into "addresslist"
addresslist.append(line.split(",")[0].replace('"', ''))

© 2017 UGN Security Forum