fengx1a0 / Bilibili_show_ticket_auto_order

352 stars 88 forks source link

exe在哪里? #45

Closed Pancat009 closed 1 year ago

Pancat009 commented 1 year ago

这源代码里没有exe?报错 Message: 'msedgedriver' executable needs to be in PATH. Please download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

File "O:\Code\bilibili\Bilibili_show_ticket_auto_order-main\login.py", line 28, in get_login WebDriver = webdriver.Edge(options=options) File "O:\Code\bilibili\Bilibili_show_ticket_auto_order-main\login.py", line 50, in get_login() selenium.common.exceptions.WebDriverException: Message: 'msedgedriver' executable needs to be in PATH. Please download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

这个,下了啥driver也没用,有小白用step by step教程吗?

Just-Prog commented 1 year ago

看起来是 selenium 的自动下载没有成功

手动操作:

  1. 在 Microsoft Edge 浏览器地址栏输入 edge://version,确认自己浏览器的版本号。
  2. Microsoft Edge WebDriver - Microsoft Edge Developer下载好对应上你浏览器版本的 x64 的 msedgedriver (一般来说用Stable Channel)
  3. 把下载下来的压缩包里的 msedgedriver.exe 扔进 C:\Windows\System32 文件夹,如果有要权限的话就点继续
  4. 再试一下脚本
Just-Prog commented 1 year ago

如果您不想污染您的 System32 文件夹,则需要您自行将 msedgedriver.exe 放在您指定的某个目录,然后把目录附加到用户环境变量 PATH

fengx1a0 commented 1 year ago

如果您不想污染您的 System32 文件夹,则需要您自行将 msedgedriver.exe 放在您指定的某个目录,然后把目录附加到用户环境变量 PATH

感谢帮忙回复, 邮件我q可以加个好友