Moved to: WoodyHayday.com
Woody Hayday

Fresh Ideas

Hi there! This is my old blog, I don't hang around here much.
You can now find me trying to mix things up here:
Visit WoodyHayday.com Subscribe To My Email List

Ebay Partner Network Changes RSS Urls (again)

If you are part of the wave of Ebay Partner Network (EPN) affiliates that stuck up middle-man eshops fed by their RSS feeds you may have missed this. In the 5 years or so I have been an ebay affiliate they have only done this a few times, but for the hundreds of custom scripts using the urls it can be no small task to reconfigure them. Anyway after putting it off till the last week I thought this week I should remedy the old RSS urls before they stop supporting them:

The existing RSS Feed Generator will no longer be available in the ePN portal after April 17th. However, your existing RSS feed URL’s will continue to be supported until June 30th. We do recommend that you switch to the new RSS Feed Generator to be sure you’re getting more relevant results in your RSS feed.

So if your in the same boat and you have hundreds (thousands?) of RSS urls hard-coded into files across multiple servers I would recommend you get working, perhaps the following will be of use. I should mention at this point that Auction 2 Post users (and Bans, Wordbay etc.) will not suffer any fallout as they use the shopping api (which is sensible now, but back in 2006 wasn’t an accessible option.)

I have written a quick transformation script (js) which will take an old epn RSS url (http://rss.api.ebay.com/ws/rssapi?…) and transform it into a new one (http://rest.ebay.com/epn/v1/find/item.rss?…), if you only have a few urls to change over then it might be enough for you:

Ebay Partner Network (EPN) RSS Url Converter/Transformer

If you have a LOT of these urls in files (like I do) then you might want to use something a little more automated. In my case I wrote a complete FTP spider which flies for each and every file hunting for old ebay RSS urls, transforming them and updating the pages. This was fine in my case because mine were pretty standardly laid out, similar use etc. I wouldn’t recommend it if you use the extremity of the RSS parameters.

Anyhow as the FTP crawler was pretty huge of a code puke, I might release that separately at some point (it has other good uses ;)), here is the csharp for transforming old RSS urls into new ones though (Note: it doesnt deal with all the parameters, only the most common/ones I use regularly, it may need tailoring.)

static string transformEPNRSSUrl(string inputUrl)
{
    string transformed = "http://rest.ebay.com/epn/v1/find/item.rss?";

    //split url by ?
    string[] splitUrl = inputUrl.Split(new char[] { '?' });

    //split second by &
    string[] splitParams = splitUrl[1].Split(new char[] { '&' });

    //new params
    string newParams = "";

    //transform params
    foreach (string s in splitParams)
    {
        string retID = "";
        string retVal = "";
        string[] sV = s.Split(new char[] { '=' });

        //mostly :p
        retVal = sV[1];

        //see if tis required
        if (sV[0] == "sacat") { retID = "categoryId1"; }
        if (sV[0] == "satitle") { retID = "keyword"; }
        if (sV[0] == "afepn") { retID = "campaignid"; }
        if (sV[0] == "customid") { retID = "customid"; }
        if (sV[0] == "saprclo") { retID = "minPrice"; }
        if (sV[0] == "saprchi") { retID = "maxPrice"; }
	
        if (retID != "")
        {
            if (newParams != "") { newParams += "&"; } //for all but first
            newParams += retID + "=" + retVal;
        }

        //last few additions 24/06/2011
        if (sV[0] == "fts" && sV[1] == "2") { newParams += "descriptionSearch=true"; }
        if (sV[0] == "sascs" && sV[1] == "2") { newParams += "listingType1=AuctionWithBIN&listingType2=FixedPrice"; }

    }

    transformed += newParams;
    //following is some defaults for me, check these yourself, use:
    //http://woodylabs.com/scripts/ebay-epn-rss-url-converter.php
    transformed += "&sortOrder=EndTimeSoonest&programid=15&toolid=10039&listingType1=All&lgeo=1&feedType=rss";

    return transformed;
}
View as txt

Use both the transformer script page and the csharp code at your own peril, it worked for me over hundreds of urls, mostly without a hitch, but thats not saying it will for you. Check your urls, after all each is probably worth £ to you. Visit the RSS urls and use the ebay tool validator to check the RSS feed has worked!

Just a quick mention of the positives of ebay deciding to rip out the old system (its not all a pain in the arse!):

  • It reminded me how widespread my old ebay affiliate sites are, it was a good excuse to take stock and write FTPCrawler
  • The whole system is much cleaner, parameter wise
  • The introduction of multiple selection parameters is useful
  • The new RSS generator is nice (as much as anyone uses the thing
This entry was posted in Affiliate Marketing, C#, Code, Javascript and tagged , . Bookmark the permalink. Both comments and trackbacks are currently closed.
Woody Hayday

Comments Archive

Hi there. This is my old blog and it's archived, so you can no longer post new comments on this post (Ebay Partner Network Changes RSS Urls (again)).

Read my new blog about writing software and stories at WoodyHayday.com

The New Blog
WoodyHayday.com
A Quote..
"This is my boast that I have no school & no follower. I should account it a measure of the impurity of insight, if it did not create independence"
Emerson
Old Random Projects
    © Woody Hayday 2008-2024