mirror of https://github.com/Xhofe/alist
* fix(lanzou):not find file page param * fix(labzou): change lanzouo.com to lanzoui.compull/6878/head
parent
5fa70e4010
commit
4a42bc5083
|
@ -30,6 +30,9 @@ func (d *LanZou) GetAddition() driver.Additional {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *LanZou) Init(ctx context.Context) (err error) {
|
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 {
|
switch d.Type {
|
||||||
case "account":
|
case "account":
|
||||||
_, err := d.Login()
|
_, err := d.Login()
|
||||||
|
|
|
@ -16,7 +16,8 @@ type Addition struct {
|
||||||
driver.RootID
|
driver.RootID
|
||||||
SharePassword string `json:"share_password"`
|
SharePassword string `json:"share_password"`
|
||||||
BaseUrl string `json:"baseUrl" required:"true" default:"https://pc.woozooo.com" help:"basic URL for file operation"`
|
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"`
|
RepairFileInfo bool `json:"repair_file_info" help:"To use webdav, you need to enable it"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,8 @@ func (d *LanZou) request(url string, method string, callback base.ReqCallback, u
|
||||||
}
|
}
|
||||||
|
|
||||||
req.SetHeaders(map[string]string{
|
req.SetHeaders(map[string]string{
|
||||||
"Referer": "https://pc.woozooo.com",
|
"Referer": "https://pc.woozooo.com",
|
||||||
|
"User-Agent": d.UserAgent,
|
||||||
})
|
})
|
||||||
|
|
||||||
if d.Cookie != "" {
|
if d.Cookie != "" {
|
||||||
|
|
Loading…
Reference in New Issue