Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions drivers/lanzou/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Addition struct {
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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lanzouo.com 貌似也有点问题,考不考虑换成 lanzoui.com

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
Loading