cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Newbie: Automated Purchasing

From: Jake Abramson <curl_at_email.liquidboxes.net>
Date: Sun, 26 Sep 2004 15:01:18 -0700

Have you heard of the ebay developer API? It's the back door access into
ebay and it's servers via XML. I've successfully accessed it from curl in
the past.

I believe they have some support for half.com, probably want to check it out.

I've found that dealing with half.com/ebay.com web page data, is that they
change the layouts rather frequently and you'll always be scrambling to
update your solution.

Check out: http://developer.ebay.com/

At 12:54 PM 9/26/2004 -0700, you wrote:
>Hello,
>
>I a bit new to this so hopefully someone can straighten me out.
>
>My Goal: To automate the purchase of a handful of books/CDs at
>www.half.com without requiring human intervention.
>
>My Progress: When I found cURL I was really excited since this seemed
>like a great way to accomplish my goal using a shell script. However
>I'm having some difficulties adding things to the half.com shopping
>cart.
>
>This first command works okay to load the product info page and setup
>some cookies:
>
>/usr/bin/curl -A "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
>rv:1.7.3) Gecko/20040913 Firefox/0.10" -L -e ";auto" -c cookies.txt -b
>cookies.txt "http://half.ebay.com/cat/buy/inv.cgi?offer_id=1157864846"
>
>This next command loads a URL from the previously loaded page. It is
>supposed to add the item to the shopping cart, but the page it returns
>says "You have no items in your cart."
>
>/usr/bin/curl -A "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
>rv:1.7.3) Gecko/20040913 Firefox/0.10" -L -e ";auto" -b cookies.txt -c
>cookies.txt
>"http://half.ebay.com/account/cart/cart.jsp?
>action=add&item=1157864846&shipmethodid=2"
>
>At first I thought that client side cookie manipulation through
>javascript might be causing the problem; but these links work fine in
>Safari or Firefox when javascript is turned off.
>
>So, am I doing anything obviously wrong? Or is this task merely not
>achievable using cURL? If is not can anyone point me to another
>utility that might help me out?
>
>Thanks so much for any input you can provide.
>
>--Joshua Horan
>
Received on 2004-09-27