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

  1. infocenter Ebay {
  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. Ebay::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 = "eBay";
  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 Ebay.com
  41. Ebay::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://search.ebay.com/search/search.dll?MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=";
  48.   QueryURL.term = "<term>";
  49.   QueryURL.midterm = "+";
  50.   QueryURL.items = "&skip=<items>";
  51.   QueryURL.setinitialpage = "No";
  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 = "http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=";
  63.   ParseSpec.termend.URL = "\">";
  64.  
  65.   ParseSpec.termstart.Title = "";
  66.   ParseSpec.termstart.Title.offset = 2;
  67.   ParseSpec.termend.Title = "</a>";
  68.  
  69.   ParseSpec.termstart.Price = "<font size=3><b>";
  70.   ParseSpec.termstart.Price.offset = 16;
  71.   ParseSpec.termend.Price = "</b>";
  72.   
  73.   ParseSpec.termstart.Bids = "<font size=3>";
  74.   ParseSpec.termstart.Bids.offset = 13;
  75.   ParseSpec.termend.Bids = "</font>";
  76.  
  77.   ParseSpec.termstart.Ends = "size=3>";
  78.   ParseSpec.termstart.Ends.offset = 7;
  79.   ParseSpec.termend.Ends = "</font>";
  80.  
  81.   ParseSpec.nextpage = "<input type=\"submit\" value=\"Next\">";
  82. }
  83.  
  84.   
  85.