From ffff3bdeb19b7e73af615a4bb61b5cd6ae949e0b Mon Sep 17 00:00:00 2001 From: yeongpin Date: Sat, 29 Mar 2025 22:22:43 +0800 Subject: [PATCH] Update block_domain.txt to include corhash.net and mailshou.com; modify new_signup.py and new_tempemail.py to conditionally set the --no-sandbox argument for Linux platforms. --- block_domain.txt | 4 +++- new_signup.py | 7 ++++--- new_tempemail.py | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/block_domain.txt b/block_domain.txt index 7811c24..e3412a6 100644 --- a/block_domain.txt +++ b/block_domain.txt @@ -17,4 +17,6 @@ mailpull.com drewzen.com begemail.com dugmail.com -solerbe.net \ No newline at end of file +solerbe.net +corhash.net +mailshou.com \ No newline at end of file diff --git a/new_signup.py b/new_signup.py index d78a637..b67fefa 100644 --- a/new_signup.py +++ b/new_signup.py @@ -203,9 +203,10 @@ def setup_driver(translator=None): # Use incognito mode co.set_argument("--incognito") - # Set random port - co.set_argument("--no-sandbox") - + if sys.platform == "linux": + # Set random port + co.set_argument("--no-sandbox") + # Set random port co.auto_port() diff --git a/new_tempemail.py b/new_tempemail.py index b65573a..307b301 100644 --- a/new_tempemail.py +++ b/new_tempemail.py @@ -107,7 +107,9 @@ class NewTempEmail: # 创建浏览器选项 co = ChromiumOptions() co.set_argument("--headless=new") - co.set_argument("--no-sandbox") + + if sys.platform == "linux": + co.set_argument("--no-sandbox") co.auto_port() # 自动设置端口