Skip to content
This repository was archived by the owner on May 24, 2025. It is now read-only.

Commit 03514db

Browse files
committed
Added an option to add browser other than Chrome
1 parent 527b89e commit 03514db

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ The process begins by utilizing the [Mails.org](https://mails.org/) service to o
3535
```shell
3636
git clone https://github.com/qing762/exitLag-auto-signup/
3737
```
38-
- Install [Google Chrome](https://google.com/chrome/) (IMPORTANT!)
39-
```shell
40-
INSTALL HERE: https://google.com/chrome/
41-
```
4238

4339
- Install the necessary dependencies:
4440
```shell

main.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import re
33
import warnings
44
import time
5+
import os
56
from tqdm import TqdmExperimentalWarning
67
from tqdm.rich import tqdm
78
from DrissionPage import Chromium, ChromiumOptions
@@ -13,11 +14,33 @@
1314

1415
async def main():
1516
lib = Main()
16-
port = ChromiumOptions().auto_port()
17+
co = ChromiumOptions()
18+
co.auto_port()
19+
co.incognito()
1720

1821
print("Checking for updates...")
1922
await lib.checkUpdate()
2023

24+
while True:
25+
browserPath = input(
26+
"\033[1m"
27+
"\n(RECOMMENDED) Press enter in order to use the default browser path (If you have Chrome installed)"
28+
"\033[0m"
29+
"\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)"
30+
"\nHere are some supported browsers that are tested and able to use:"
31+
"\n- Chrome"
32+
"\n- Brave"
33+
"\nBrowser executable path: "
34+
).replace('"', "").replace("'", "")
35+
if browserPath != "":
36+
if os.path.exists(browserPath):
37+
co.set_browser_path(browserPath)
38+
break
39+
else:
40+
print("Please enter a valid path.")
41+
else:
42+
break
43+
2144
while True:
2245
passw = (
2346
input(
@@ -57,7 +80,7 @@ async def main():
5780
bar = tqdm(total=100)
5881
bar.set_description(f"Initial setup completed [{x + 1}/{executionCount}]")
5982
bar.update(20)
60-
chrome = Chromium(addr_or_opts=port)
83+
chrome = Chromium(addr_or_opts=co)
6184
page = chrome.get_tab(id_or_num=1)
6285
page.listen.start("https://mails.org", method="POST")
6386
page.get("https://mails.org")

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.94
1+
v3.95

0 commit comments

Comments
 (0)