Results 1 to 2 of 2

Thread: Couponing with Bash

  1. #1
    Join Date
    Aug 2006
    Location
    Gallatin Tennessee
    Beans
    353
    Distro
    Lubuntu

    Question Couponing with Bash

    Hi All

    I am trying to assist my wife with some couponing and I feel that there is probably an easier method of retrieving all the info we need to make it work. For instance, I was thinking that instead of going to Kroger.com to look for the deals, I could use either wget or elinks to pull up the page, and use grep to look for the deals and list them.

    Unfortunately, for Kroger.com, you have to enter in your zip code before you look. Any thoughts on this little project?
    There's always a workaround; finding it is the hard part.

  2. #2
    Join Date
    Dec 2010
    Beans
    570
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Couponing with Bash

    If you look at the HTML source of the page you should be able to see what the field name is for the ZIP you need to enter and then you can use wget and the "--post-data=STRING" option. The URL you want to use is the one for the form post action. If the site sets a sesion cookie you will need to use the "--save-cookies=FILE" option on the inital request and then "--load-cookies=FILE" on subsequent requests.

Tags for this Thread

Bookmarks

Posting Permissions

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