Results 1 to 7 of 7
  1. #1
    Newbie
    Join Date
    February 10th, 2005
    Posts
    8
    CJ datafeed download
    Has anyone gotten a shell script to download the datafeeds via CJ automatically ? For some reason you have to know the file name, a simple "mget *" doesn't work...

  2. #2
    Member ripe's Avatar
    Join Date
    January 18th, 2005
    Posts
    141
    wget help you

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    396
    Why I know not but instead of pulling files with mget, you are triggering some sort of a function that dynamically builds your list from the latest data they have in their database and this function doesn't handle '**'.

    I just put all of the names in my shell script - they don't change very often and I avoid the frustration - WGET worked for me but I can't get it 'loaded' on the server I'm using to collect the data

    Charles

  4. #4
    Newbie
    Join Date
    February 10th, 2005
    Posts
    8
    I'm pretty familiar with wget, but do they offer http access to the datafeeds? Or are you saying I should use wget via the ftp interface? It's the fact that the datafeed appends the date generated on it that complicates the filenames and automated scripts.

  5. #5
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    You can have CJ change your datafeed zip file to a static file name. This way you don't need to know the new file name every time they update. You can request this through their Contact Form.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    396
    Opps - I was asleep and mixed my LS answer into my CJ answer - after a great deal of study I happened onto the following script (because I was trying to figure out if there were any flags I could set) - it works and I have absolutely NO idea why.

    ===============================
    open datatransfer.cj.com
    xxxxxxxxx <=== my number
    yyyyyyyy <=== my password
    cd outgoing/productcatalog/zzzz <=== your directory
    binary

    mget -help <=== A very strange solution ??????????
    bye
    =============================

    Charles

  7. #7
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    I do something like this from PHP on Unix, assuming that you're running this the day after the feed is supposed to be there, since they tend to be late

    PHP Code:
    $myAid "000000";
    $myFeed "0000";
    $myFeedDay "Thursday";
    $myPassword "password";
    $myFeedDir "/tmp";

    $feed $myAid."_".$myFeed."_".date("Ymd",strtotime("last ".$myFeedDay)).".txt";

    echo 
    "Will retrieve $feed\n";

    system("cd $myFeedDir; /usr/bin/wget ftp://${myAid}:${myPassword}@datatransfer.cj.com/outgoing/productcatalog/${myFeed}/${feed}.gz; /usr/bin/gunzip ${feed}.gz"); 
    Tim
    consultant by day, affiliate by night

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. How to automatically download a datafeed ?
    By glittered in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: January 8th, 2006, 06:02 PM
  2. Datafeed download problem?
    By cditty in forum BettyMills
    Replies: 9
    Last Post: October 3rd, 2003, 08:22 PM

Posting Permissions

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