Add user agent to UberEatsBot
This commit is contained in:
@@ -55,9 +55,11 @@ class UberEatsBot(MultiBot, ABC):
|
||||
for i, cookies in enumerate(chat.ubereats['cookies']):
|
||||
for _ in range(3):
|
||||
try:
|
||||
self.task_contexts[chat.id]['browser'] = await self.task_contexts[chat.id]['playwright'].chromium.launch()
|
||||
context: playwright.async_api.BrowserContext = await self.task_contexts[chat.id]['browser'].new_context()
|
||||
await context.add_cookies(cookies)
|
||||
self.task_contexts[chat.id]['browser'] = await self.task_contexts[chat.id]['playwright'].chromium.launch(headless=False)
|
||||
context: playwright.async_api.BrowserContext = await self.task_contexts[chat.id]['browser'].new_context(
|
||||
storageState={'cookies': cookies},
|
||||
user_agent=flanautils.USER_AGENT
|
||||
)
|
||||
|
||||
page = await context.new_page()
|
||||
await page.goto('https://www.myunidays.com/ES/es-ES/partners/ubereats/access/online')
|
||||
|
||||
Reference in New Issue
Block a user