Web Scraping Question

S

Selden McCabe

I'm trying to get some information from a web site where you normally enter
a value, and click a button. I'd like to do this automatically.

I'm using the WebClient class like this:
client.Headers.Add("Content-Type", "application/x-www-form-urlencoded")

byteArray = Encoding.ASCII.GetBytes(sLinkScript)

responseArray = client.UploadData(URL, byteArray)

For example, the California State Contractor's Licens board at

http://www2.cslb.ca.gov/CSLB_LIBRARY/license+request.asp

I'm setting the script to:

"LicNum=789168&EditForm=Yes&CheckLicense.x=81&CheckLicense.y=13"
(I got this part from an example, and I don't fully understand what it's
supposed to do.
There is a text box named "LicNum" and a button named "CheckLicense" on the
web page...)

It fills in the license number, but just sits there on the web site without
looking up the contracor's license information.

What am I doing wrong? How do I "click" the button?

Thanks,
---Selden McCabe
 
C

Chad Z. Hower aka Kudzu

Selden McCabe said:
It fills in the license number, but just sits there on the web site without
looking up the contracor's license information.

What am I doing wrong? How do I "click" the button?

Dont use upload -thats the wrong method. You have to POST the data (or in
some case GET it)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top