Fix parsing of high bidder/buyer information in fixed price listings.

Improve date parsing, so that listings with the word 'end' someplace in the text title aren't dying.

by mrs, 18 Aug, 2009 10:27 PM
1000 1013  
2727 ebayServer.titleDisney=^Disney at ebay item.*
2828 ebayServer.titleCollections=^Great Collections item.*
2929 ebayServer.bidCountRegex=(?:var itemNumBids = |itemNumBids:)"Bids([0-9]+)"
30 ebayServer.currentBid=((((Current)|(Winning)|(Starting)).bid[^d])|(Sold.for)|(Starts.at)|(Advertised.price)|(Closed.at)):?
30 ebayServer.currentBid=((((Current)|(Winning)|(Starting)).bid[^d])|(Sold.for)|(Starts.at)|(Advertised.price)|(Sold.[fF]or)|(Closed.at)):?
3131 ebayServer.lowestBid=Lowest
3232 ebayServer.firstBid=First bid
3333 ebayServer.yourMaxBid=Your maximum bid:
1000 1013  
1 title.end_time=(?i)(Ends|end.time).+?([A-Za-z]+(.[0-9]+)+.[A-Z]+)
1 title.end_time=(?i)\\((?:item [0-9]+ )?(Ends|end.time).+?([A-Za-z]+(.[0-9]+)+.[A-Z]+)
22 ebayServer.startTime=(Started|Start.time:?|Starting.time:?|List.date:)
33 ebayServer.postTitleIgnore=(home|Item.number)
44 ebayServer.itemNumber=(?si).*Item.number.*?([0-9]+).*
------
2727 ebayServer.titleDisney=^Disney at ebay item.*
2828 ebayServer.titleCollections=^Great Collections item.*
2929 ebayServer.bidCountRegex=(?:var itemNumBids = |itemNumBids:)"Bids([0-9]+)"
30 ebayServer.currentBid=((((Current)|(Winning)|(Starting)).bid[^d])|(Sold.for)|(Starts.at)|(Advertised.price)|(Closed.at)):?
30 ebayServer.currentBid=((((Current)|(Winning)|(Starting)).bid[^d])|(Sold.for)|(Starts.at)|(Advertised.price)|(Sold.[fF]or)|(Closed.at)):?
3131 ebayServer.lowestBid=Lowest
3232 ebayServer.firstBid=First bid
3333 ebayServer.yourMaxBid=Your maximum bid:
1009 1013  
20272027   public static List<AuctionEntry> findAllBy(String column, String value) {
20282028     return (List<AuctionEntry>)ActiveRecord.findAllBy(AuctionEntry.class, column, value);
20292029   }
2030 
2031   public void setNumBids(int bidCount) {
2032     mAuction.setNumBids(bidCount);
2033   }
20302034 }
1005 1013  
469469     if (checkSeller(ae)) return ParseErrors.SELLER_AWAY;
470470 
471471     checkDates(prelimTitle, ae);
472     checkHighBidder();
472 //    checkHighBidder();
473473     checkReserve();
474474     checkPrivate();
475475 
1006 1013  
109109     if(htmlDocument.isLoaded()) {
110110       List<JHTML.Table> bidderTables = htmlDocument.extractTables();
111111       for (JHTML.Table t : bidderTables) {
112         if (t.rowCellMatches(0, "^Bidder.*")) {
113           int bidCount = t.getRowCount() - 2; // 1 for the header, and 1 for the Starting Price
112         if (t.rowCellMatches(0, "^(Bidder|User ID).*")) {
113           int bidCount = t.getRowCount() - 1; // 1 for the header
114 
115           // -1 for the starting price
116           if(t.rowCellMatches(bidCount, "Starting Price")) bidCount -= 1;
117 
118           if(ae.getNumBidders() == 0) ae.setNumBids(bidCount);
114119           int myMostRecentRow = -1;
115           for(int i=1; i<t.getRowCount()-1; i++) {
120           for(int i=1; i < bidCount+1; i++) {
116121             if(t.getCell(0, i).equals(mLogin.getUserId())) {
117122               myMostRecentRow = i;
118123               break;