mirror of
https://github.com/Balshgit/mosgortrans.git
synced 2025-09-11 13:00:40 +03:00
configure with Path
This commit is contained in:
parent
818c5bf317
commit
249a198401
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
0
app/core/__init__.py
Normal file
0
app/core/__init__.py
Normal file
@ -36,7 +36,7 @@ def configure_firefox_driver(private_window: bool = False) -> WebDriver:
|
||||
opt.add_argument(f'{Path.home()}/snap/firefox/common/.mozilla/firefox')
|
||||
if private_window:
|
||||
opt.set_preference("browser.privatebrowsing.autostart", True)
|
||||
service = Service(executable_path=str(BASE_DIR / 'geckodriver'))
|
||||
service = Service(executable_path=BASE_DIR / 'geckodriver')
|
||||
firefox_driver = webdriver.Firefox(service=service, options=opt)
|
||||
|
||||
return firefox_driver
|
||||
@ -79,5 +79,3 @@ def parse_site(driver: WebDriver, url: str, message: str) -> str:
|
||||
if bus_t19:
|
||||
answer += f'Автобус {bus_t19.text} - {bus_t19_arrival.text}'
|
||||
return answer
|
||||
|
||||
download_gecko_driver()
|
BIN
app/geckodriver
Executable file
BIN
app/geckodriver
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user