Skip to content

Commit

Permalink
Added an option to add browser other than Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
qing762 committed Feb 11, 2025
1 parent 527b89e commit 03514db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ The process begins by utilizing the [Mails.org](https://mails.org/) service to o
```shell
git clone https://github.com/qing762/exitLag-auto-signup/
```
- Install [Google Chrome](https://google.com/chrome/) (IMPORTANT!)
```shell
INSTALL HERE: https://google.com/chrome/
```

- Install the necessary dependencies:
```shell
Expand Down
27 changes: 25 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
import warnings
import time
import os
from tqdm import TqdmExperimentalWarning
from tqdm.rich import tqdm
from DrissionPage import Chromium, ChromiumOptions
Expand All @@ -13,11 +14,33 @@

async def main():
lib = Main()
port = ChromiumOptions().auto_port()
co = ChromiumOptions()
co.auto_port()
co.incognito()

print("Checking for updates...")
await lib.checkUpdate()

while True:
browserPath = input(
"\033[1m"
"\n(RECOMMENDED) Press enter in order to use the default browser path (If you have Chrome installed)"
"\033[0m"
"\nIf you prefer to use other Chromium browser other than Chrome, please enter its executable path here. (e.g: C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe)"
"\nHere are some supported browsers that are tested and able to use:"
"\n- Chrome"
"\n- Brave"
"\nBrowser executable path: "
).replace('"', "").replace("'", "")
if browserPath != "":
if os.path.exists(browserPath):
co.set_browser_path(browserPath)
break
else:
print("Please enter a valid path.")
else:
break

while True:
passw = (
input(
Expand Down Expand Up @@ -57,7 +80,7 @@ async def main():
bar = tqdm(total=100)
bar.set_description(f"Initial setup completed [{x + 1}/{executionCount}]")
bar.update(20)
chrome = Chromium(addr_or_opts=port)
chrome = Chromium(addr_or_opts=co)
page = chrome.get_tab(id_or_num=1)
page.listen.start("https://mails.org", method="POST")
page.get("https://mails.org")
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.94
v3.95

0 comments on commit 03514db

Please sign in to comment.