use new agent generation instead of expired one

This commit is contained in:
Kirill
2025-01-05 17:07:14 +04:00
parent ceb2104960
commit 736c3675b6
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import express, { Request, Response } from 'express';
import bodyParser from 'body-parser';
import { chromium, Browser, BrowserContext, Route, Request as PlaywrightRequest } from 'playwright';
import dotenv from 'dotenv';
import randomUseragent from 'random-useragent';
import UserAgent from 'user-agents';
import { getError } from './helpers/get_error';
dotenv.config();
@@ -60,7 +60,7 @@ const initializeBrowser = async () => {
]
});
const userAgent = randomUseragent.getRandom();
const userAgent = new UserAgent().toString();
const viewport = { width: 1280, height: 800 };
const contextOptions: any = {