I have been writing some code so I can input information into an online form and then I want to gather the results to write on an internal company website...however right now I just want to gather data and then I can write the code to input it in the company site.
Here is the code that I have so far:
import mechanize
br = mechanize.Browser()
br.open("https://www.loopnet.com/search/commercial-real-estate/for-lease/?sk=cdca5d8f06ae14ca00ac2b9e47c4afac&e=u")
br.select_form(nr=0)
br.form['States'] = 'California'
br.firm['City'] = 'San Diego, CA'
br.find_control['Office'].items[0].selected = True
What I am looking to do is:
- go to the site
- fill out the form, entering states, city
- Check the box next to 'office'
- generate results
- collect results
Any help would be appreciated.
Best Ben
Aucun commentaire:
Enregistrer un commentaire