Skip to content

Commit 77f764e

Browse files
committed
fix: npm mirror
1 parent 2fe2c24 commit 77f764e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/kotlin/xyz/cssxsh/mirai/selenium/MiraiSeleniumPlugin.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public object MiraiSeleniumPlugin : KotlinPlugin(
104104

105105
override fun PluginComponentStorage.onLoad() {
106106
SeleniumLogger.level = Level.OFF
107-
System.setProperty(CHROME_DRIVER_MIRRORS, "https://npm.taobao.org/mirrors/chromedriver")
108-
System.setProperty(FIREFOX_DRIVER_MIRRORS, "https://npm.taobao.org/mirrors/geckodriver")
107+
System.setProperty(CHROME_DRIVER_MIRRORS, "https://npmmirror.com/mirrors/chromedriver")
108+
System.setProperty(FIREFOX_DRIVER_MIRRORS, "https://npmmirror.com/mirrors/geckodriver")
109109
System.setProperty(SELENIUM_FOLDER, dataFolder.resolve("selenium").absolutePath)
110110

111111
if (System.getProperty("mirai.slider.captcha.supported").toBoolean()) {

src/main/kotlin/xyz/cssxsh/selenium/SeleniumInit.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ internal fun setupChromeDriver(folder: File, chromium: Boolean): RemoteWebDriver
488488
val supplier = fetchChromeDriver(folder = folder, version = version0)
489489
if (supplier != null) return supplier
490490

491-
// MIRRORS "https://npm.taobao.org/mirrors/chromedriver"
491+
// MIRRORS "https://npmmirror.com/mirrors/chromedriver"
492492
val base = System.getProperty(CHROME_DRIVER_MIRRORS, "https://chromedriver.storage.googleapis.com")
493493

494494
// 映射
@@ -630,7 +630,7 @@ internal fun setupFirefoxDriver(folder: File): RemoteWebDriverSupplier {
630630
}
631631
else -> throw UnsupportedOperationException("不受支持的平台 $platform")
632632
}
633-
// https://npm.taobao.org/mirrors/geckodriver/
633+
// https://npmmirror.com/mirrors/geckodriver/
634634
val base = System.getProperty(FIREFOX_DRIVER_MIRRORS, "https://github.com/mozilla/geckodriver/releases/download")
635635
val file = download(
636636
urlString = "$base/$version/$filename",

src/test/kotlin/xyz/cssxsh/selenium/SeleniumTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ internal abstract class SeleniumTest {
1919

2020
init {
2121
System.setProperty(SELENIUM_FOLDER, folder.resolve("selenium").apply { mkdirs() }.absolutePath)
22-
System.setProperty(CHROME_DRIVER_MIRRORS, "https://npm.taobao.org/mirrors/chromedriver")
23-
System.setProperty(FIREFOX_DRIVER_MIRRORS, "https://npm.taobao.org/mirrors/geckodriver")
22+
System.setProperty(CHROME_DRIVER_MIRRORS, "https://npmmirror.com/mirrors/chromedriver")
23+
System.setProperty(FIREFOX_DRIVER_MIRRORS, "https://npmmirror.com/mirrors/geckodriver")
2424
// System.setProperty("selenium.webdriver.verbose", "true")
2525
org.slf4j.bridge.SLF4JBridgeHandler.removeHandlersForRootLogger()
2626
org.slf4j.bridge.SLF4JBridgeHandler.install()

0 commit comments

Comments
 (0)