U
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
// src/modules/x-browser/x-browser.service.ts
|
||||
import {
|
||||
Injectable,
|
||||
Logger,
|
||||
OnModuleInit,
|
||||
OnModuleDestroy, HttpException,
|
||||
} from '@nestjs/common';
|
||||
import {chromium, Browser, BrowserContext, Page} from 'playwright';
|
||||
import {buildXCookies} from "./utils/x-headers.util";
|
||||
import {HttpException, Injectable, Logger, OnModuleDestroy, OnModuleInit,} from '@nestjs/common';
|
||||
import {Browser, BrowserContext, chromium, Page} from 'playwright';
|
||||
import {rand} from "../helper";
|
||||
|
||||
export interface BrowserAccount {
|
||||
@@ -91,7 +85,7 @@ export class XBrowserService implements OnModuleInit, OnModuleDestroy {
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ' +
|
||||
'(KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
|
||||
viewport: {width: 1366, height: 768},
|
||||
locale: 'en-US',
|
||||
locale: process.env.BROWSER_LOCALE || 'en-US',
|
||||
proxy: account.proxy ? {server: account.proxy} : undefined,
|
||||
});
|
||||
console.log('getOrCreateContext:5')
|
||||
|
||||
@@ -77,7 +77,7 @@ export class XPosterRouterService {
|
||||
},
|
||||
],
|
||||
proxy: '',
|
||||
userAgent: ''
|
||||
userAgent: process.env.BROWSER_USER_AGENT || '',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user