added credits
This commit is contained in:
parent
f5e61409ef
commit
093b386515
@ -11,6 +11,7 @@ This is a Python script which allows you to continue to use the HEI VPN on Linux
|
||||
- [How does this script work ?](#how-does-this-script-work-)
|
||||
- [Why is it asking me for sudo privileges ?](#why-is-it-asking-me-for-sudo-privileges-)
|
||||
- [Contributions](#contributions)
|
||||
- [Credits](#credits)
|
||||
|
||||
|
||||
## Requirements
|
||||
@ -54,3 +55,9 @@ If you don't trust me, I encourage you to take a look at the source code and see
|
||||
## Contributions
|
||||
|
||||
I made this mainly for myself but thought I would share it in the hope it could help at least one other person. Feel free to make suggestions, create issues and/or pull requests.
|
||||
|
||||
## Credits
|
||||
|
||||
Thanks to [sh4dowb](https://gist.github.com/sh4dowb) for the workaround used to save Firefox profiles even when using Selenium ([gist](https://gist.github.com/sh4dowb/0054e4b25bf81bccca6f9e622c5cb160))
|
||||
|
||||
Thanks to [artfulrobot](https://stackoverflow.com/users/623519/artfulrobot) for their class allowing to "OR" multiple expected conditions ([StackOverflow answer](https://stackoverflow.com/a/16464305/11109181))
|
||||
|
4
main.py
4
main.py
@ -66,6 +66,8 @@ PERSISTENT_PROFILE_PATH = os.path.join(APP_PATH, "firefox_profile/")
|
||||
if not os.path.isdir(APP_PATH):
|
||||
os.mkdir(APP_PATH)
|
||||
|
||||
# by artfulrobot on StackOverflow
|
||||
# https://stackoverflow.com/a/16464305/11109181
|
||||
class AnyEc:
|
||||
""" Use with WebDriverWait to combine expected_conditions
|
||||
in an OR.
|
||||
@ -120,6 +122,8 @@ def startBrowser(headless: bool = True) -> tuple[Firefox, FirefoxProfile]:
|
||||
def closeBrowser(driver: Firefox, distinguishkey: str) -> None:
|
||||
infoLogger.log("Closing browser...")
|
||||
|
||||
# Workaround by sh4dowb on GitHub
|
||||
# https://gist.github.com/sh4dowb/0054e4b25bf81bccca6f9e622c5cb160
|
||||
for pid in psutil.pids():
|
||||
try:
|
||||
cmdline = open("/proc/"+str(pid)+"/cmdline", "r").read()
|
||||
|
Loading…
Reference in New Issue
Block a user