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.
- M jbidwatcher/trunk/ebay_co_uk.properties view
- M jbidwatcher/trunk/ebay_com.properties view
- M jbidwatcher/trunk/src/com/jbidwatcher/auction/AuctionEntry.java view
- M jbidwatcher/trunk/src/com/jbidwatcher/auction/server/ebay/ebayAuction.java view
- M jbidwatcher/trunk/src/com/jbidwatcher/auction/server/ebay/ebayServer.java view
| 1000 | 1013 | |
|---|---|---|
| 27 | 27 | ebayServer.titleDisney=^Disney at ebay item.* |
| 28 | 28 | ebayServer.titleCollections=^Great Collections item.* |
| 29 | 29 | 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)):? | |
| 31 | 31 | ebayServer.lowestBid=Lowest |
| 32 | 32 | ebayServer.firstBid=First bid |
| 33 | 33 | 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]+) | |
| 2 | 2 | ebayServer.startTime=(Started|Start.time:?|Starting.time:?|List.date:) |
| 3 | 3 | ebayServer.postTitleIgnore=(home|Item.number) |
| 4 | 4 | ebayServer.itemNumber=(?si).*Item.number.*?([0-9]+).* |
| --- | --- | |
| 27 | 27 | ebayServer.titleDisney=^Disney at ebay item.* |
| 28 | 28 | ebayServer.titleCollections=^Great Collections item.* |
| 29 | 29 | 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)):? | |
| 31 | 31 | ebayServer.lowestBid=Lowest |
| 32 | 32 | ebayServer.firstBid=First bid |
| 33 | 33 | ebayServer.yourMaxBid=Your maximum bid: |
| 1009 | 1013 | |
|---|---|---|
| 2027 | 2027 | public static List<AuctionEntry> findAllBy(String column, String value) { |
| 2028 | 2028 | return (List<AuctionEntry>)ActiveRecord.findAllBy(AuctionEntry.class, column, value); |
| 2029 | 2029 | } |
| 2030 | ||
| 2031 | public void setNumBids(int bidCount) { | |
| 2032 | mAuction.setNumBids(bidCount); | |
| 2033 | } | |
| 2030 | 2034 | } |
| 1005 | 1013 | |
|---|---|---|
| 469 | 469 | if (checkSeller(ae)) return ParseErrors.SELLER_AWAY; |
| 470 | 470 | |
| 471 | 471 | checkDates(prelimTitle, ae); |
| 472 | checkHighBidder(); | |
| 472 | // checkHighBidder(); | |
| 473 | 473 | checkReserve(); |
| 474 | 474 | checkPrivate(); |
| 475 | 475 | |
| 1006 | 1013 | |
|---|---|---|
| 109 | 109 | if(htmlDocument.isLoaded()) { |
| 110 | 110 | List<JHTML.Table> bidderTables = htmlDocument.extractTables(); |
| 111 | 111 | 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); | |
| 114 | 119 | int myMostRecentRow = -1; |
| 115 | for(int i=1; i<t.getRowCount()-1; i++) { | |
| 120 | for(int i=1; i < bidCount+1; i++) { | |
| 116 | 121 | if(t.getCell(0, i).equals(mLogin.getUserId())) { |
| 117 | 122 | myMostRecentRow = i; |
| 118 | 123 | break; |
