Added a few chrome options

This commit is contained in:
Profitroll 2023-08-23 14:19:39 +02:00
parent fbb22875c9
commit 745e89c8a6
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2

View File

@ -1,11 +1,17 @@
from typing import Union from typing import Union
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from selenium import webdriver from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
def get_balance(card_id: Union[str, int]) -> Union[str, None]: def get_balance(card_id: Union[str, int]) -> Union[str, None]:
driver = webdriver.Chrome() chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = Chrome(options=chrome_options)
driver.get(f"https://bwtaqua.com.ua/card-topup/?id={card_id}") driver.get(f"https://bwtaqua.com.ua/card-topup/?id={card_id}")