start
This commit is contained in:
@@ -41,8 +41,8 @@ public class AuctionParsingTest {
|
||||
System.out.println("\n=== Auction Parsing Test ===");
|
||||
System.out.println("Found " + auctionLinks.size() + " auction links");
|
||||
|
||||
List<TroostwijkScraper.AuctionInfo> auctions = new ArrayList<>();
|
||||
int count = 0;
|
||||
List<AuctionInfo> auctions = new ArrayList<>();
|
||||
int count = 0;
|
||||
|
||||
for (Element link : auctionLinks) {
|
||||
String href = link.attr("href");
|
||||
@@ -59,7 +59,7 @@ public class AuctionParsingTest {
|
||||
int auctionId = Integer.parseInt(matcher.group(2));
|
||||
|
||||
// Extract auction info using IMPROVED text-based method
|
||||
TroostwijkScraper.AuctionInfo auction = extractAuctionInfoFromText(link, href, auctionId, "A" + typeNum);
|
||||
AuctionInfo auction = extractAuctionInfoFromText(link, href, auctionId, "A" + typeNum);
|
||||
auctions.add(auction);
|
||||
|
||||
// Print the first 10 auctions for verification
|
||||
@@ -101,7 +101,7 @@ public class AuctionParsingTest {
|
||||
assertTrue(auctions.size() > 0, "Should find at least one auction");
|
||||
|
||||
// Verify all auctions have basic info
|
||||
for (TroostwijkScraper.AuctionInfo auction : auctions) {
|
||||
for (AuctionInfo auction : auctions) {
|
||||
assertNotNull(auction.title, "Title should not be null for auction " + auction.auctionId);
|
||||
assertTrue(auction.title.length() > 0, "Title should not be empty for auction " + auction.auctionId);
|
||||
assertNotNull(auction.url, "URL should not be null for auction " + auction.auctionId);
|
||||
@@ -119,8 +119,8 @@ public class AuctionParsingTest {
|
||||
* Expected format: "[day] om [time] [lot_count] [title] [city], [CC]"
|
||||
* Example: "woensdag om 18:00 1 Vrachtwagens voor bedrijfsvoertuigen Loßburg, DE"
|
||||
*/
|
||||
private TroostwijkScraper.AuctionInfo extractAuctionInfoFromText(Element link, String href, int auctionId, String type) {
|
||||
TroostwijkScraper.AuctionInfo auction = new TroostwijkScraper.AuctionInfo();
|
||||
private AuctionInfo extractAuctionInfoFromText(Element link, String href, int auctionId, String type) {
|
||||
AuctionInfo auction = new AuctionInfo();
|
||||
auction.auctionId = auctionId;
|
||||
auction.type = type;
|
||||
auction.url = "https://www.troostwijkauctions.com" + href;
|
||||
|
||||
Reference in New Issue
Block a user