lanzou

package module
v0.0.0-...-bc705cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 11 Imported by: 0

README

lanzou

提取蓝奏云下载直链

QuickStart

go get -u github.com/Doraemonkeys/lanzou

package main

import (
	"fmt"
	"github.com/Doraemonkeys/lanzou"
)

func main() {
	file, err := lanzou.GetDownloadUrl("https://XXXXX", "pwd", "desiredFileName")
	if err != nil {
		fmt.Println(err)
		return
	}
    fmt.Println(file.Name)
	fmt.Println(file.DirectUrl)
	lanzou.Download(file.DirectUrl, "./"+file.Name)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(url string, filename string) error

Download可用于下载未重定向的原始蓝奏云直链,filename为文件存储的路径(可省略)+文件名

Types

type LFile

type LFile struct {
	DirectUrl string
	//Size        int64
	Name string
}

func GetDownloadUrl

func GetDownloadUrl(homeUrl string, pwd string, wantFilename string) (file LFile, err error)

从蓝奏云获取指定文件的下载直链,若链接为文件夹,则filename必填,否则不知道下载哪个文件

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL