Added a few chrome options
This commit is contained in:
parent
fbb22875c9
commit
745e89c8a6
@ -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}")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user