1
0
Эх сурвалжийг харах

修复 zimuku 下载页面超时问题,#255 https://github.com/wloot/ChineseSubFinder/commit/9937fbf56351a3124aa58c819d6698580d608cad#diff-858a1a26e7f1022d449c8f81b0f7c1e74161102053e2d5dfce4814820dd42f1cR610

Signed-off-by: allan716 <[email protected]>
allan716 3 жил өмнө
parent
commit
1bd58c5ebe

+ 1 - 1
internal/logic/sub_supplier/zimuku/zimuku.go

@@ -606,7 +606,7 @@ func (s Supplier) step3(browser *rod.Browser, subDownloadPageUrl string) (string
 	downloadSuccess := false
 	downloadSuccess := false
 	err = rod.Try(func() {
 	err = rod.Try(func() {
 		tmpDir := filepath.Join(global_value.DefTmpFolder(), "downloads")
 		tmpDir := filepath.Join(global_value.DefTmpFolder(), "downloads")
-		wait := browser.WaitDownload(tmpDir)
+		wait := browser.Timeout(10 * time.Second).WaitDownload(tmpDir)
 		getDownloadFile := func() ([]byte, string, error) {
 		getDownloadFile := func() ([]byte, string, error) {
 			info := wait()
 			info := wait()
 			downloadPath := filepath.Join(tmpDir, info.GUID)
 			downloadPath := filepath.Join(tmpDir, info.GUID)