prevelance data added

This commit is contained in:
2026-06-07 12:06:41 -04:00
parent cc7b2a593a
commit 876c26968b
11 changed files with 2305 additions and 148 deletions

View File

@@ -51,7 +51,7 @@ interface DiseaseRow {
// ─── Config ──────────────────────────────────────────────────────────────────
const POLITE_DELAY = 1100; // ms between calls
const POLITE_DELAY = 800; // ms between calls
const DB_FLUSH_BATCH = 50;
const STATE_FILE = resolve(__dirname, ".ddg-progress.json");
@@ -163,6 +163,8 @@ async function main() {
const query1 = `${d.name} on ${plantName} plant disease`;
const query2 = `${d.scientificName || d.name} on ${plantName} disease`;
const query3 = `${d.name} plant disease ${plantName}`;
const query4 = `${d.name} plant`;
const query5 = `${d.name} symptom`;
process.stdout.write(
` [${String(i + 1).padStart(4)}/${pending.length}] [${sev}] ${d.name.substring(0, 42).padEnd(44)} `,
@@ -170,7 +172,7 @@ async function main() {
// Try queries in order until we get a result
let url: string | null = null;
for (const q of [query1, query2, query3]) {
for (const q of [query1, query2, query3, query4, query5]) {
url = await searchImage(q);
if (url) break;
}