chore: biome auto-fixes
This commit is contained in:
@@ -191,7 +191,7 @@ function parseEbayListings(
|
|||||||
const actualPrices: HTMLElement[] = [];
|
const actualPrices: HTMLElement[] = [];
|
||||||
for (const el of allPriceElements) {
|
for (const el of allPriceElements) {
|
||||||
const text = el.textContent?.trim();
|
const text = el.textContent?.trim();
|
||||||
if (text && /^\s*[\$£€¥]/u.test(text) && text.length < 50 && !/\d{4}/.test(text)) {
|
if (text && /^\s*[$£€¥]/u.test(text) && text.length < 50 && !/\d{4}/.test(text)) {
|
||||||
actualPrices.push(el);
|
actualPrices.push(el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ function parseEbayListings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let priceText = priceElement?.textContent?.trim();
|
const priceText = priceElement?.textContent?.trim();
|
||||||
|
|
||||||
if (!priceText) continue;
|
if (!priceText) continue;
|
||||||
|
|
||||||
@@ -252,7 +252,6 @@ function parseEbayListings(
|
|||||||
results.push(listing);
|
results.push(listing);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(`Error parsing eBay listing: ${err}`);
|
console.warn(`Error parsing eBay listing: ${err}`);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -573,7 +573,6 @@ export function extractFacebookMarketplaceData(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,8 +589,6 @@ export function extractFacebookMarketplaceData(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Ignore parsing errors for other scripts
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -737,8 +734,6 @@ export function extractFacebookItemData(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Log parsing errors for debugging but continue to next script
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -810,7 +805,7 @@ export function parseFacebookAds(ads: FacebookAdNode[]): FacebookListingDetails[
|
|||||||
const address = cityName || null;
|
const address = cityName || null;
|
||||||
|
|
||||||
// Determine listing status from Facebook flags
|
// Determine listing status from Facebook flags
|
||||||
let listingStatus: string | undefined = undefined;
|
let listingStatus: string | undefined ;
|
||||||
if (listing.is_sold) {
|
if (listing.is_sold) {
|
||||||
listingStatus = "SOLD";
|
listingStatus = "SOLD";
|
||||||
} else if (listing.is_pending) {
|
} else if (listing.is_pending) {
|
||||||
@@ -862,8 +857,6 @@ export function parseFacebookAds(ads: FacebookAdNode[]): FacebookListingDetails[
|
|||||||
|
|
||||||
results.push(listingDetails);
|
results.push(listingDetails);
|
||||||
} catch {
|
} catch {
|
||||||
// Skip malformed ads
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user