Web Scraping Question

Discussion in 'ASP .Net' started by Selden McCabe, Feb 21, 2004.

  1. 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
     
    Selden McCabe, Feb 21, 2004
    #1
    1. Advertising

  2. "Selden McCabe" <> wrote in news:ugDuNDJ#DHA.1052
    @TK2MSFTNGP12.phx.gbl:
    > 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)


    --
    Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
    "Programming is an art form that fights back"
     
    Chad Z. Hower aka Kudzu, Feb 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Selden McCabe

    General Web Scraping Question

    Selden McCabe, Feb 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    411
    Joerg Jooss
    Feb 22, 2004
  2. Brent
    Replies:
    8
    Views:
    8,476
    Developer2010
    Oct 19, 2010
  3. Lucas Tam

    Web Screen Scraping Tools

    Lucas Tam, Oct 6, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    661
    Paul D. Fox
    Oct 6, 2005
  4. John J. Lee

    JavaScript web scraping test cases?

    John J. Lee, Aug 20, 2003, in forum: Python
    Replies:
    6
    Views:
    459
    Cousin Stanley
    Aug 25, 2003
  5. David Jones

    Web Scraping/Site Scraping

    David Jones, Jul 11, 2004, in forum: Python
    Replies:
    4
    Views:
    530
    Andrew Bennetts
    Jul 13, 2004
Loading...

Share This Page