fix(lanzou): download not find file sgin (close #5046 in #5048)

This commit is contained in:
foxxorcat
2023-08-20 13:08:57 +08:00
committed by GitHub
parent b6cd40e6d3
commit 358c5055e9
2 changed files with 83 additions and 3 deletions

View File

@ -346,7 +346,11 @@ func (d *LanZou) getFilesByShareUrl(shareID, pwd string, sharePageData string) (
// 需要密码
if strings.Contains(sharePageData, "pwdload") || strings.Contains(sharePageData, "passwddiv") {
param, err := htmlFormToMap(sharePageData)
sharePageData, err := getJSFunctionByName(sharePageData, "down_p")
if err != nil {
return nil, err
}
param, err := htmlJsonToMap(sharePageData)
if err != nil {
return nil, err
}
@ -370,8 +374,7 @@ func (d *LanZou) getFilesByShareUrl(shareID, pwd string, sharePageData string) (
if err != nil {
return nil, err
}
nextPageData := RemoveNotes(string(data))
nextPageData := removeJSGlobalFunction(RemoveNotes(string(data)))
param, err = htmlJsonToMap(nextPageData)
if err != nil {
return nil, err