ADSB backfill fix?
This commit is contained in:
@@ -200,11 +200,11 @@ async function scrapeHexDatabase(icao) {
|
||||
|
||||
const cells = row.find('td');
|
||||
return {
|
||||
country: $(cells[1]).text().trim() || null,
|
||||
registration: $(cells[2]).text().trim() || null,
|
||||
aircraft: $(cells[3]).text().trim() || null,
|
||||
operator: $(cells[4]).text().trim() || null,
|
||||
serialNumber: $(cells[6]).text().trim() || null,
|
||||
country: $(cells[0]).text().trim() || null,
|
||||
registration: $(cells[1]).text().trim() || null,
|
||||
aircraft: $(cells[2]).text().trim() || null,
|
||||
operator: $(cells[3]).text().trim() || null,
|
||||
serialNumber: $(cells[5]).text().trim() || null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -242,11 +242,8 @@ export async function enrichAircraft(a) {
|
||||
let found = await hexDbPromise;
|
||||
if(!found) found = await scrapePromise;
|
||||
if(!found) {
|
||||
console.log(`not found: ${icao}`)
|
||||
noRecord.push(icao);
|
||||
return { icao, ...a, type: 'unknown' };
|
||||
} else {
|
||||
console.log(`found: ${icao}`)
|
||||
}
|
||||
|
||||
// 3. Backfill manufacturer/model/engines from similar aircraft type in DB
|
||||
|
||||
Reference in New Issue
Block a user