nomagick commited on
Commit
dc4605d
·
unverified ·
1 Parent(s): 6b1bfda

saas: use windows ua for more desktop screenshot

Browse files
src/services/puppeteer.ts CHANGED
@@ -583,7 +583,7 @@ export class PuppeteerControl extends AsyncService {
583
  });
584
  this.ua = await this.browser.userAgent();
585
  this.logger.info(`Browser launched: ${this.browser.process()?.pid}, ${this.ua}`);
586
- this.effectiveUA = this.ua.replace(/Headless/i, '').replace('Mozilla/5.0 (X11; Linux x86_64)', 'Mozilla/5.0 (Linux; Android 10; K)');
587
  this.curlControl.impersonateChrome(this.effectiveUA);
588
 
589
  await this.newPage('beware_deadlock').then((r) => this.__loadedPage.push(r));
 
583
  });
584
  this.ua = await this.browser.userAgent();
585
  this.logger.info(`Browser launched: ${this.browser.process()?.pid}, ${this.ua}`);
586
+ this.effectiveUA = this.ua.replace(/Headless/i, '').replace('Mozilla/5.0 (X11; Linux x86_64)', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)');
587
  this.curlControl.impersonateChrome(this.effectiveUA);
588
 
589
  await this.newPage('beware_deadlock').then((r) => this.__loadedPage.push(r));
src/services/serp/puppeteer.ts CHANGED
@@ -300,7 +300,7 @@ export class SERPSpecializedPuppeteerControl extends AsyncService {
300
  });
301
  this.ua = await this.browser.userAgent();
302
  this.logger.info(`Browser launched: ${this.browser.process()?.pid}, ${this.ua}`);
303
- this.effectiveUA = this.ua.replace(/Headless/i, '').replace('Mozilla/5.0 (X11; Linux x86_64)', 'Mozilla/5.0 (Linux; Android 10; K)');
304
  this.curlControl.impersonateChrome(this.effectiveUA);
305
 
306
  await this.newPage('beware_deadlock').then((r) => this.__loadedPage.push(r));
 
300
  });
301
  this.ua = await this.browser.userAgent();
302
  this.logger.info(`Browser launched: ${this.browser.process()?.pid}, ${this.ua}`);
303
+ this.effectiveUA = this.ua.replace(/Headless/i, '').replace('Mozilla/5.0 (X11; Linux x86_64)', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)');
304
  this.curlControl.impersonateChrome(this.effectiveUA);
305
 
306
  await this.newPage('beware_deadlock').then((r) => this.__loadedPage.push(r));