diff --git a/src/classes/scrape-command.class.ts b/src/classes/scrape-command.class.ts index fdd06dd0..06137f05 100644 --- a/src/classes/scrape-command.class.ts +++ b/src/classes/scrape-command.class.ts @@ -96,7 +96,9 @@ export abstract class ScrapeCommand< } public async newPage(): Promise { - return await this.browser.newPage(); + const page = await this.browser.newPage(); + page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'); + return page; } async getActivePage(timeout: number = 500) { diff --git a/src/commands/scrape/amazon/index.ts b/src/commands/scrape/amazon/index.ts index 51b32e50..bf55312d 100644 --- a/src/commands/scrape/amazon/index.ts +++ b/src/commands/scrape/amazon/index.ts @@ -42,6 +42,7 @@ export default class Amazon extends ScrapeCommand { public async run(): Promise { this.options = this.flags; await this.handleOnlyNewOption(); + this.logger.debug(`Options: ${JSON.stringify(this.options, null, 4)}`); this.currentPage = await this.newPage();