You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instruction: "Extract detailed product information from this Amazon product page, including name, price, description, specifications, brand, category, image URL, rating, review count, and availability",
359
-
schema: ProductSchema.omit({dateScraped: true}),
360
-
});
366
+
constproduct=awaitstagehand.extract(
367
+
"Extract detailed product information from this Amazon product page, including name, price, description, specifications, brand, category, image URL, rating, review count, and availability",
368
+
ProductSchema.omit({dateScraped: true}),
369
+
);
361
370
362
371
// Add additional data
363
372
constcompleteProduct: Product={
@@ -445,11 +454,9 @@ async function runQueries(): Promise<void> {
445
454
// ========== Main Function ==========
446
455
asyncfunctionmain({
447
456
page,
448
-
context,
449
457
stagehand,
450
458
}: {
451
459
page: Page;
452
-
context: BrowserContext;
453
460
stagehand: Stagehand;
454
461
}){
455
462
try{
@@ -471,7 +478,7 @@ async function main({
471
478
console.log(chalk.blue("📊 Starting to scrape product listing..."));
0 commit comments