Skip to content

Commit

Permalink
feat: #38 #48 #47
Browse files Browse the repository at this point in the history
  • Loading branch information
mikumifa committed Apr 21, 2024
1 parent f9bc652 commit 0c29e70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,5 @@ def stop():
stop_btn.click(fn=stop, inputs=None, outputs=[go_ui, stop_btn, qr_image, gt_row], )

# 运行应用
print("点击下面的网址运行程序 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓")
demo.launch()
11 changes: 10 additions & 1 deletion util/configUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ def __init__(self, config_file_path):

def _login_and_save_cookies(self, login_url="https://show.bilibili.com/platform/home.html"):
logging.info("启动浏览器中.....")
self.driver = webdriver.Edge()
try:
self.driver = webdriver.Edge()
except Exception as e:
try:
self.driver = webdriver.Chrome()
except Exception as e:
raise Exception("没有找到浏览器驱动,请根据自己的浏览器下载相应的驱动:\n"
"相关教程:https://blog.csdn.net/zz00008888/article/details/127903475\n"
"Edge: https://liushilive.github.io/github_selenium_drivers/md/IE.html\n"
"Chrome:https://liushilive.github.io/github_selenium_drivers/md/Chrome.html\n")
self.wait = WebDriverWait(self.driver, 0.5)
self.driver.get(login_url)
self.driver.maximize_window()
Expand Down

0 comments on commit 0c29e70

Please sign in to comment.