home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / server / netbrilliant / nb110.exe / DATA1.CAB / Data_files / scripts / MSNauction.cham < prev    next >
Encoding:
Text File  |  2000-10-30  |  2.3 KB  |  83 lines

  1. infocenter MSNAuction {
  2. action:
  3.   Init;       // Required for all infocenters.
  4.  
  5.   Search;     // Required for NetBrilliant.
  6.   
  7. field:
  8.   URL;       // All these are required for NetBrilliant.
  9.   Title;
  10.   Price;
  11.   Bids;
  12.   Ends;
  13.  
  14.   nextpage;  // Required - this is where the value for whether
  15.              // or not there is another page of data goes.
  16. }
  17.  
  18. MSNAuction::Init
  19. {
  20.   // Set initialization parameters.
  21.   // NetBrilliant will access these to learn about this
  22.   // infocenter.
  23.  
  24.   Category = "Auctions";
  25.   Bitmap = "images\auctions.bmp";
  26.   IndexOrder = 0;
  27.   IDNumber = 0;            // For convenience, make the same as the IndexOrder
  28.   SiteName = "MSN Auction";
  29.  
  30.   // These are the column titles in the search results
  31.   // window.  If a field is not covered here, it will
  32.   // not appear in the window.
  33.  
  34.   FieldName.Title = "Item";
  35.   FieldName.Price = "Price";
  36.   FieldName.Bids = "Bids";
  37.   FieldName.Ends = "Ending time (PDT)";
  38. }
  39.  
  40. // Searches MSNAuction
  41. MSNAuction::Search
  42. {
  43.   // QueryURL is the formatting parameter for constructing
  44.   // the query URL.  Members include "base", "term", "midterm",
  45.   // and "end"
  46.  
  47.   QueryURL.base = "http://auctions.msn.com/Scripts/LotSearch.asp?submitFlag=1&ProdName=";
  48.   QueryURL.term = "<term>";
  49.   QueryURL.midterm = "+";
  50.   QueryURL.page = "&PageNo=<page>";
  51.   QueryURL.setinitialpage = "Yes";
  52.  
  53.   // QueryURL also supports pages:
  54.   //   QueryURL.page  = "&page=<page>";
  55.   //   QueryURL.page0 = "&page=<page>";  (zero-based)
  56.  
  57.   // ParseSpec handles the start and end of terms, and the
  58.   // start of data, that type of thing.  The below is fairly
  59.   // explanatory.  Any field with neglected termstart and termend
  60.   // will not be parsed by Chameleon.
  61.  
  62.   ParseSpec.termstart.URL = "<font class=text><a href=\"ListingInfo.asp";
  63.   ParseSpec.termstart.URL.offset = 26;
  64.   ParseSpec.termstart.URL.prepend = "http://auctions.msn.com/Scripts/";
  65.   ParseSpec.termend.URL = "\">";
  66.  
  67.   ParseSpec.termstart.Title = "";
  68.   ParseSpec.termstart.Title.offset = 2;
  69.   ParseSpec.termend.Title = "</b>";
  70.  
  71.   ParseSpec.termstart.Bids = "<font class=text>";
  72.   ParseSpec.termstart.Bids.offset = 17;
  73.   ParseSpec.termend.Bids = "</font>";
  74.  
  75.   ParseSpec.termstart.Price = "<font class=text>";
  76.   ParseSpec.termstart.Price.offset = 17;
  77.   ParseSpec.termend.Price = "</font>";
  78.   
  79.   ParseSpec.nextpage = "Next>";
  80. }
  81.  
  82.   
  83.