www.webdeveloper.com
Results 1 to 3 of 3

Thread: Login and screen scrape

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Login and screen scrape

    Hi, I need help logging in to a site remotely, storing the cookies, then screen scraping a page that uses its cookies.

    I have the login working fine but it redirects to the page that the site has listed.

    Any ideas?

  2. #2
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,114
    Post your code.

  3. #3
    Join Date
    Jun 2009
    Posts
    8

    login and scrape webpage using biterscripting IS

    You may want to try biterscripting IS (Internet Session - http://www.biterscripting.com/helppa...dinternet.html ). Here is code that I extracted from one of my scripts.


    Code:
    # A string variable to store source for a web page
    var str page
    
    # Start a browser session.
    # "s" is the session name.
    isstart "s" "Page Scrape" "Mozilla/4.0"
    
    # Connect to webserver.
    # I am using a fictitious address.
    isconnect "s" "http://www.site9476zyx.com"
    
    # Exchange cookies.
    script SS_ISCookies.txt from("s") to("s")
    
    # Login
    issubmit "s" "/loginpage.php" "login=IAmMe" "password=MyPassword" > $page
    
    # Parse $page - assuming you want to extract a table from the page
    # and put it in .CSV format.
    echo $page > "tempfile.html"
    script SS_WebPageToCSV.txt page("tempfile.html")
    
    # We are done. Disconnect and close session (we will be nice).
    isdiscon "s"
    isclose "s"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles