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

  1. infocenter YahooAuction {
  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. YahooAuction::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 = "Yahoo";
  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 Yahoo.com
  41. YahooAuction::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.auctions.yahoo.com/search/auc?p=";
  48.   QueryURL.term = "<term>";
  49.   QueryURL.midterm = "+";
  50.   QueryURL.page = "&apg=<page>";
  51.   QueryURL.end = "&alocale=1us&acc=us";
  52.  
  53.   ParseSpec.datastart = "Title Search Results";
  54.  
  55.   ParseSpec.termstart.URL = "href=\"http://page.auctions.yahoo.com/auction";
  56.   ParseSpec.termstart.URL.offset = 6;
  57.   ParseSpec.termend.URL = "\">";
  58.  
  59.   ParseSpec.termstart.Title = "";
  60.   ParseSpec.termstart.Title.offset = 2;
  61.   ParseSpec.termend.Title = "</a>";
  62.  
  63.   ParseSpec.termstart.Price = "$";
  64.   ParseSpec.termend.Price = "</b></td><td align=center>";
  65.   
  66.   ParseSpec.termstart.Bids = "";
  67.   ParseSpec.termstart.Bids.offset = 26;
  68.   ParseSpec.termend.Bids = "</td><td align=right>";
  69.  
  70.   ParseSpec.termstart.Ends = "";
  71.   ParseSpec.termstart.Ends.offset = 21;
  72.   ParseSpec.termend.Ends = "</td></tr>";
  73.  
  74.   ParseSpec.nextpage = "Next 50";
  75. }
  76.  
  77.   
  78.