Skip to content

Commit

Permalink
fix(lanzou): not find file page param (#6862 close #6857)
Browse files Browse the repository at this point in the history
* fix(lanzou):not find file page param

* fix(labzou): change lanzouo.com to lanzoui.com
  • Loading branch information
foxxorcat committed Jul 25, 2024
1 parent 5fa70e4 commit 4a42bc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions drivers/lanzou/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion drivers/lanzou/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/lanzou/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 4a42bc5

Please sign in to comment.