All Projects → ying32 → xldl

ying32 / xldl

Licence: MIT license
迅雷下载引擎SDK Go语言版

Programming Languages

go
31211 projects - #10 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to xldl

YouTube-MA
💾 YouTube video metadata archiver written in Golang
Stars: ✭ 17 (-29.17%)
Mutual labels:  downloader
TikTok
Download public videos on TikTok using Python with Selenium
Stars: ✭ 37 (+54.17%)
Mutual labels:  downloader
radiojavan.sh
download your favorite musics from radiojavan 👨‍🎤
Stars: ✭ 19 (-20.83%)
Mutual labels:  downloader
instagram-liked-posts-downloader
Download liked (or all) posts from an Instagram profile.
Stars: ✭ 19 (-20.83%)
Mutual labels:  downloader
pdbfetch
Fetch PDB symbols directly from Microsoft's symbol servers
Stars: ✭ 33 (+37.5%)
Mutual labels:  downloader
weibo-image-spider
微博图片爬虫,极速下载、高清原图、多种命令、简单实用。
Stars: ✭ 52 (+116.67%)
Mutual labels:  downloader
Pyaiodl
A python Asynchronous Downloader - Pyaiodl
Stars: ✭ 40 (+66.67%)
Mutual labels:  downloader
redvid
Smart downloader for Reddit hosted videos
Stars: ✭ 83 (+245.83%)
Mutual labels:  downloader
gsrd
GitHub Starred Repos Downloader
Stars: ✭ 23 (-4.17%)
Mutual labels:  downloader
CourseDownloader
GUI app for downloading whole online courses with folder structure from one url
Stars: ✭ 20 (-16.67%)
Mutual labels:  downloader
patreon-dl
A Patreon Image Downloader
Stars: ✭ 52 (+116.67%)
Mutual labels:  downloader
util
封装了一些Java常用的功能
Stars: ✭ 19 (-20.83%)
Mutual labels:  downloader
sapfy
Spotify daemon recorder and downloader
Stars: ✭ 55 (+129.17%)
Mutual labels:  downloader
mmdl
MMDL (Mega Music Downloader) - A tool to easily download music.
Stars: ✭ 29 (+20.83%)
Mutual labels:  downloader
All-Url-Uploader
A simple telegram Bot, Upload Media File| video To telegram using the direct download link. (youtube, Mediafire, google drive, mega drive, etc)
Stars: ✭ 122 (+408.33%)
Mutual labels:  downloader
yutto
🧊 一个可爱且任性的 B 站视频下载器(bilili V2)
Stars: ✭ 383 (+1495.83%)
Mutual labels:  downloader
Vividl
Modern Windows GUI for youtube-dl/ yt-dlp
Stars: ✭ 189 (+687.5%)
Mutual labels:  downloader
Zoom2Youtube
Transfer video recordings from the Zoom to YouTube
Stars: ✭ 63 (+162.5%)
Mutual labels:  downloader
codecourse-downloader
codecourse.com video downloader.
Stars: ✭ 60 (+150%)
Mutual labels:  downloader
WaveSDK
WaveSDK, 让音乐跟上你的步频,根据跑步记录,智能推送歌曲,可高度化定制二次开发,为Android开发者提供了简单,快捷的接口 跑嗨乐.
Stars: ✭ 36 (+50%)
Mutual labels:  downloader

xldl

Xunlei download engine SDK

迅雷下载引擎SDK Go语言版

使用方法:

// XLSdkTest project main.go
// 迅雷下载sdk 翻译by: ying32  qq:1444386932
// api说明见:http://open.xunlei.com/wiki/api_doc.html#1
package main

import (
	"fmt"
	"os"

	"time"

	"github.com/ying32/xldl"

	"os/exec"
	"path/filepath"
)

var (
	exitLoop bool
)

func main() {

	file, _ := exec.LookPath(os.Args[0])
	path := filepath.Dir(file)

	println(path)

	if !xldl.InitXLEngine() {
		fmt.Println("初始引擎失败!")
		return
	}
	defer xldl.UnInitXLEngine()
	dloader := xldl.NewXLDownloader(path)

	task := dloader.AddTask("http://sw.bos.baidu.com/sw-search-sp/software/19de58890ffb8/QQ_8.6.18804.0_setup.exe", "QQ_8.6.18804.0_setup.exe")
	fmt.Println("任务启动:", task.Start())

	go func() {
		var exit string
		for {
			fmt.Scan(&exit)
			if exit == "q" {
				exitLoop = true
				break
			}
		}
	}()

	for !exitLoop {
		info, ret := task.Info()
		if ret {
			fmt.Printf("TotalSize=%d, Percent=%f, Speed=%d\n", info.TotalSize, info.Percent, info.Speed)
			switch info.Stat {
			case xldl.TSC_COMPLETE:
				fmt.Println("下载完成")
				task.Delete()
				return
			case xldl.TSC_ERROR:
				fmt.Println("下载错误。")
			}
		}
		time.Sleep(time.Millisecond * 500)
	}
	task.Stop()
	task.Delete()
	fmt.Println("删除:", task.DeleteTempFile())
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].