fix(lanzou): not find file page param (#6862 close #6857)

* fix(lanzou):not find file page param

* fix(labzou): change lanzouo.com to lanzoui.com
pull/6878/head
foxxorcat 2024-07-25 20:09:48 +08:00 committed by GitHub
parent 5fa70e4010
commit 4a42bc5083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

@ -30,6 +30,9 @@ func (d *LanZou) GetAddition() driver.Additional {
}
func (d *LanZou) Init(ctx context.Context) (err error) {
if d.UserAgent == "" {
d.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.39 (KHTML, like Gecko) Chrome/89.0.4389.111 Safari/537.39"
}
switch d.Type {
case "account":
_, err := d.Login()

View File

@ -16,7 +16,8 @@ type Addition struct {
driver.RootID
SharePassword string `json:"share_password"`
BaseUrl string `json:"baseUrl" required:"true" default:"https://pc.woozooo.com" help:"basic URL for file operation"`
ShareUrl string `json:"shareUrl" required:"true" default:"https://pan.lanzouo.com" help:"used to get the sharing page"`
ShareUrl string `json:"shareUrl" required:"true" default:"https://pan.lanzoui.com" help:"used to get the sharing page"`
UserAgent string `json:"user_agent" required:"true" default:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.39 (KHTML, like Gecko) Chrome/89.0.4389.111 Safari/537.39"`
RepairFileInfo bool `json:"repair_file_info" help:"To use webdav, you need to enable it"`
}

View File

@ -106,7 +106,8 @@ func (d *LanZou) request(url string, method string, callback base.ReqCallback, u
}
req.SetHeaders(map[string]string{
"Referer": "https://pc.woozooo.com",
"Referer": "https://pc.woozooo.com",
"User-Agent": d.UserAgent,
})
if d.Cookie != "" {