infocenter MSNAuction { action: Init; // Required for all infocenters. Search; // Required for NetBrilliant. field: URL; // All these are required for NetBrilliant. Title; Price; Bids; Ends; nextpage; // Required - this is where the value for whether // or not there is another page of data goes. } MSNAuction::Init { // Set initialization parameters. // NetBrilliant will access these to learn about this // infocenter. Category = "Auctions"; Bitmap = "images\auctions.bmp"; IndexOrder = 0; IDNumber = 0; // For convenience, make the same as the IndexOrder SiteName = "MSN Auction"; // These are the column titles in the search results // window. If a field is not covered here, it will // not appear in the window. FieldName.Title = "Item"; FieldName.Price = "Price"; FieldName.Bids = "Bids"; FieldName.Ends = "Ending time (PDT)"; } // Searches MSNAuction MSNAuction::Search { // QueryURL is the formatting parameter for constructing // the query URL. Members include "base", "term", "midterm", // and "end" QueryURL.base = "http://auctions.msn.com/Scripts/LotSearch.asp?submitFlag=1&ProdName="; QueryURL.term = ""; QueryURL.midterm = "+"; QueryURL.page = "&PageNo="; QueryURL.setinitialpage = "Yes"; // QueryURL also supports pages: // QueryURL.page = "&page="; // QueryURL.page0 = "&page="; (zero-based) // ParseSpec handles the start and end of terms, and the // start of data, that type of thing. The below is fairly // explanatory. Any field with neglected termstart and termend // will not be parsed by Chameleon. ParseSpec.termstart.URL = ""; ParseSpec.termstart.Title = ""; ParseSpec.termstart.Title.offset = 2; ParseSpec.termend.Title = ""; ParseSpec.termstart.Bids = ""; ParseSpec.termstart.Bids.offset = 17; ParseSpec.termend.Bids = ""; ParseSpec.termstart.Price = ""; ParseSpec.termstart.Price.offset = 17; ParseSpec.termend.Price = ""; ParseSpec.nextpage = "Next>"; }