Coder Social home page Coder Social logo

gaowanliang / downloadbot Goto Github PK

View Code? Open in Web Editor NEW
802.0 17.0 215.0 7.21 MB

(Currently) 🤖 A distributed cross-platform Telegram Bot that can control your Aria2 server, control server files and also upload to OneDrive / Google Drive.

License: Apache License 2.0

Go 100.00%
aria2-server magnet telegram-bot websocket onedrive googledrive download torrent downloadbot telegram

downloadbot's Introduction

简体中文 繁體中文

DownloadBot

Go Version Release Version GitHub license GitHub Star GitHub Fork

(Currently) 🤖 A distributed cross-platform Telegram Bot that can control your Aria2 server, control server files and also upload to OneDrive / Google Drive.

Project significance

The following is only a vision of what this program will look like when it is completed, the functions described so far are not fully implemented, please refer to the following Functions realized for details of implementation

This project is mainly to use small hard disk server for offline downloading, for large BitTorrent files to be downloaded in sections according to the size of the hard disk, each time downloading a part, then uploading the network disk, delete and then download the other parts, until all the files are downloaded.

At the same time, communication via the bot protocol facilitates use on machines that cannot intranet penetration, and simplifies the usual use of download programs for added convenience.For links, sending a message directly to the Bot will directly identify and download them. It can actually delete files from the download folder, which is not possible with web panels such as AriaNG, and is very convenient as a tool for managing downloads and notifying timely completion of downloads. You can move files, and for users who mount their hard drives via rclone you can copy and paste directly through this program, without having to open an ssh connection to the VPS for cp operations, which is also very convenient.

Functions realized

Note: This project is still in beta testing and the Release submitted is for testing purposes only. Downloading it now does not guarantee you stable use, nor does it guarantee that the content ticked below has been implemented. The software is only stable when the submitted version is v1.0 (v1.0 will not implement all of the features below, but it will work properly and stably).

Only the checked content is currently implemented

Download method

  • Aria2 control
    • Persistent monitoring
    • Automatic reconnection after disconnection
  • Multi download server control at the same time
    • Multi server download information notification using GRPC
  • SimpleTorrent control
  • qbittorrent control

The Bot protocol supports

  • Telegram Bot
    • Support multi-user use
    • Support group use
  • Tencent QQ (Use regular QQ users to interact)
  • DingTalk Bot

Function

  • Control server files
    • Delete files
    • Move/Copy files
    • Compressed files
  • Download files
    • Download HTTP/FTP link
    • Download Magnet link
    • Download the files in the BitTorrent file
    • Custom BitTorrent/Magnet download
      • Select only the largest file to download
      • Intelligent file selection based on file size, do not select small files in BitTorrent/Magnet.
    • Download files from OneDrive/SharePoint share links (Python script currently used as a demo)
      • xxx-my.sharepoint.com Download of share links
        • Downloading multiple files without password for shared links
        • Downloading multiple files with password for shared links
        • Download of files in nested folders
        • Download any file of your choice
      • xxx.sharepoint.com Downloads with share links
      • xxx-my.sharepoint.cn Download of share links (theoretically supported)
    • Download BitTorrent/Magnet according to the size of storage space
      • Do not download files that exceed storage space
      • Download the files in BitTorrent/Magnet several times according to the storage space
    • Senseless seeding functions
      • After each BitTorrent/Magnet file download, keep the last downloaded file for seeding until the next download starts.
      • Can be set to force seeding for a period of time at the end of each download
  • Upload a file
    • Upload the file to OneDrive when the download is complete
      • Resume from break point
      • Supports 21vianet (CN) version
    • Upload the file to Google Drive when the download is complete
      • Custom upload chunk size
      • Custom number of upload threads
      • Custom timeout time
    • Upload the file to Mega when the download is complete
    • Upload the file to 189Cloud when the download is complete
    • (When communicating via Telegram) Upload the file to Telegram when the download is complete
      • When the file exceeds 2GB, it is compressed in chunks before uploading
  • Additional features
    • Multilingual support
      • Simplified Chinese
      • English
      • Traditional Chinese
      • Japanese
    • No human intervention, fully automatic downloads of BitTorrent site
      • Nyaa
      • ThePirateBay
    • Other functions
      • File tree output system
        • File tree output for simple folders
        • Use multi message output for complex folder structures
      • Get all CIDs used in DMM via actor ID
      • Query the movie parameters in "ikoa" (using mahuateng).
      • Get the numbers of all actors via the javlibary actors' website.
      • Query the dmm cid information, preview the movie, preview the picture.
      • Search by keyword in sukebei.
      • Search in dmm based on keywords, up to 30 items.
      • Enter the dmm link to list all items.
      • Search for current dmm hits and the latest movies, limited to 30 (beta).

Current features

  1. Fully touch based, more easy to use, no command required to use this bot.
  2. Real time notification, it's now using Aria2's Websocket protocol to communicate.
  3. Better config file support.

Setup

  1. Create your own bot and get its access token by using @BotFather
  2. (Optional) Telegram blocked in your region/country? be sure to have a HTTP proxy up and running,and You can set your system environment variable HTTPS_Proxy is the proxy address.
  3. Download this program
  4. Configure config.json at the root of the program that you want to execute.
  5. Run the executable file

tutorial

For a more detailed tutorial, please see: Step by Step Guide for DownloadBot

DownloadBot Q&A

Screenshots


Example of a profile

{
  "input": {
    "aria2": {
      "aria2-server": "ws://127.0.0.1:6800/jsonrpc",
      "aria2-key": "123456"
    }
  },
  "output": {
    "telegram": {
      "bot-key": "",
      "user-id": ""
    }
  },
  "max-index": 10,
  "sign": "Main Aria2",
  "language": "en",
  "downloadFolder": "/root/download",
  "moveFolder": "/root/upload",
  "server": {
    "isServer": true,
    "isMasterServer": true,
    "serverHost": "127.0.0.1",
    "serverPort": 23369
  },
  "log": {
    "logPath": "",
    "errPath": "",
    "level": "info"
  }
}

Corresponding explanations

  • input : Input method, currently only supports aria2

    • aria2-server : Aria2 server address. Websocket connection is used by default. If you want to use websocket to connect to aria2, be sure to set enable-rpc=true in aria2.conf. If not necessary, please try to set the local aria2 address, in order to maximize the use of this program
    • aria2-key : The value of rpc-secret in aria2.conf
  • output : Output method, currently only supports telegram

    • bot-key : ID of telegram Bot, get it by using @BotFather
    • user-id : The ID of the administrator. It supports setting multiple users as administrators. Different users are separated by commas , . If you want to set the users whose user-id are 123465789, 987654321 and 963852741 as administrators, you need to set them as follows:
      {
        //···
        "user-id": "123456789",
        //···
      }
  • max-index:Maximum display quantity of download information, 10 pieces are recommended (to be improved in the future)

  • sign: Identification of this Bot, If multiple servers are required to connect to the same Bot, the specific server can be determined through this item.

  • language: Language of Bot output

  • downloadFolder: Aria2 download file save address.If you do not use this parameter, enter ""

  • moveFolder: The folder to which you want to move the files for the downloadFolder. If you do not use this parameter, enter ""

  • server: Server configuration

    • isServer: Whether to enable server mode, if you want to use this program as a server, set it to true(When set to false, it means that this machine is a client)
    • isMasterServer: Whether to enable master server mode, if you want to use this program as a master server, set it to true(now must be set to true)
    • serverHost: if it is a client, this item needs to fill in the server address, if it is the main server, this item is the local address
    • serverPort: If it is a client, this item needs to fill in the server port, if it is the main server, this item is the port provided to the client
  • log: Log configuration

    • logPath: Log file path, if you do not use this parameter, enter ""(now invalid)
    • errPath: Error log file path, if you do not use this parameter, enter ""(now invalid)
    • level: Log level, debug, info, warn, error, fatal, panic are supported, the default is info

Currently supported languages and language tags

Languages Tag
English en
Simplified Chinese zh-CN
Traditional Chinese zh-TW

When you fill in the above language tag in config.json, the program will automatically download the language pack

About user-id

If you don't know your user-id, you can leave this field blank and enter /myid after running the Bot, and the Bot will return your user-id

donator

If you want to support this project, you can donate to the following address, thank you very much!

https://ko-fi.com/gaowanliang

downloadbot's People

Contributors

dulljz avatar gaowanliang avatar reaitten avatar user1121114685 avatar wangedward avatar xmjwit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

downloadbot's Issues

运行./DownloadBot时报错

2021/07/23 01:51:31 strconv.ParseInt: parsing "": invalid syntax
panic: strconv.ParseInt: parsing "": invalid syntax

goroutine 37 [running]:
log.Panic(0xc00025f3a8, 0x1, 0x1)
D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
D:/program_data/go/DownloadBot/main.go:14
main.toInt64(0x0, 0x0, 0x4)
D:/program_data/go/DownloadBot/utils.go:514 +0x9d
main.TMSelectMessage(0xc000212c80)
D:/program_data/go/DownloadBot/Telegram.go:62 +0x4e
created by main.tgBot
D:/program_data/go/DownloadBot/Telegram.go:707 +0x85d

config.json

Can you tell the path where I should edit the variables cause I cannot find the files in the repository. Hoping you would help soon

希望可以解答下以下几个问题

希望可以指定配置文件路径,这样可以用 systemctl 控制后台运行,或者现在用什么保证后台运行,screen?

使用多台服务器连接同一个机器人时,会报错,那么一台服务器还是要一个机器人吗?
2021/04/02 23:42:14 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
2021/04/02 23:42:14 Failed to get updates, retrying in 3 seconds...

运行错误

当我配置好的config.json后,运行./DownloadBot,提示这些:

root@i-e5e2f29565ddd8a1:~# ./DownloadBot 
2020/12/30 06:56:40 12346
置信氥 载實06:56:40 

我没法判断这是什么错误,我应该怎么办?另外,在提示这些之后,我的tg机器人仍然是没有任何反应的。

Feature requests

1.Upload to telegram after torrent finishes.if the files is larger than 2gb,it must split and then upload to tg by parts

2.Need ZIP option to compress downloaded files before uploading to cloud (most wanted)

  1. Need RCLONE support too,then we can add gdrive,onedrive..everything in one simple setup

4.if you can add ytdl-org code support too..for downloading videos

从源码自行编译的版本在tg中点击按钮报错

运行起来之后在tg中点击“正在下载”按钮,无反应
image

回到终端中查看发现以下报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 49 [running]:
main.GetDiskPercent(0x4040d90b2164c3c0)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc001306000, 0xfa, 0x13c, 0x0, 0x0, 0xfa, 0x13c)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.activeRefresh.func1(0x0, 0x6018aa59, 0xc00035b4a0, 0xc000076fa0, 0xc0000b69a0)
        /root/DownloadBot/Telegram.go:673 +0x94
main.activeRefresh(0x4, 0xc00035b4a0, 0xc000076fa0, 0x3e4b)
        /root/DownloadBot/Telegram.go:728 +0x14d
created by main.tgBot
        /root/DownloadBot/Telegram.go:899 +0x32ca

image

点击“正在等待”按钮和“已完成”按钮也没反应
image
点击“正在等待”按钮时的报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 30 [running]:
main.GetDiskPercent(0x4059000000000000)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc0000c3000, 0xa, 0xd, 0x0, 0x0, 0x0, 0xc0000c3000)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.tgBot(0xc00002a300, 0x2e, 0xc0000294a0)
        /root/DownloadBot/Telegram.go:901 +0x312a
created by main.main
        /root/DownloadBot/main.go:34 +0x9f

点击“已完成”按钮时的报错:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x9124d6]

goroutine 30 [running]:
main.GetDiskPercent(0x4059000000000000)
        /root/DownloadBot/utils.go:590 +0x56
main.formatTellSomething(0xc0000c3000, 0xa, 0xd, 0x0, 0x0, 0x0, 0xc0000c3000)
        /root/DownloadBot/Aria2.go:186 +0x13e5
main.tgBot(0xc00002a300, 0x2e, 0xc000029490)
        /root/DownloadBot/Telegram.go:908 +0x2ffd
created by main.main
        /root/DownloadBot/main.go:34 +0x9f

image

使用release中的版本点击“正在下载”也会报错:

2022/02/23 09:25:02 context deadline exceeded
panic: context deadline exceeded

goroutine 48 [running]:
log.Panic(0xc00012cdd8, 0x1, 0x1)
        D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
        D:/program_data/go/DownloadBot/main.go:14
main.formatTellSomething(0x0, 0x0, 0x0, 0xbc6a40, 0x102fee0, 0x0, 0x0)
        D:/program_data/go/DownloadBot/Aria2.go:77 +0x8b
main.activeRefresh.func1(0x0, 0x6018aa59, 0xc00048a640, 0xc000066460, 0x0)
        D:/program_data/go/DownloadBot/Telegram.go:541 +0x94
main.activeRefresh(0x18, 0xc00048a640, 0xc000066460, 0xd857)
        D:/program_data/go/DownloadBot/Telegram.go:596 +0x159
created by main.tgBot
        D:/program_data/go/DownloadBot/Telegram.go:767 +0x3207

image

但是点击“等待中”和“已停止”按钮都不会报错,不知道什么原因,源码我是自己git clone源码之后编译的版本,系统是centos7.9,另外能否增加忽略证书错误的功能,我aria2为了适应启用了https的ariang,开启了https,然后在机器人的配置文件中使用“wss://127.0.0.1:6800/jsonrpc"连接会报错”cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
image

how to deply?

Can you add little more details regarding how to deploy this bot?

消息过长导致的服务端错误

运行环境

Debian 10, 使用 DownloadBot_0.0.5_Linux_x86_64.tar.gz 安装

报错内容

2021/05/24 18:29:50 [{86e3eeffd4b075f6}] Download started!
2021/05/24 18:29:51 [{86e3eeffd4b075f6}] Download paused!
2021/05/24 18:29:51 Bad Request: message is too long
panic: Bad Request: message is too long

goroutine 14 [running]:
log.Panic(0xc00029b730, 0x1, 0x1)
        D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
        D:/program_data/go/DownloadBot/main.go:14
main.TMSelectMessage(0xc000155c20)
        D:/program_data/go/DownloadBot/Telegram.go:169 +0x1a0d
created by main.tgBot
        D:/program_data/go/DownloadBot/Telegram.go:707 +0x85d

可能原因

根据TG官方文档, API 每条消息只能支持4096字节,或许可使用分段方式发送?

运行错误

`root@server:~/downloadbot# sudo ./DownloadBot
2021/04/04 17:17:50 12346
2021/04/04 17:17:50 stat : no such file or directory
panic: stat : no such file or directory

goroutine 1 [running]:
log.Panic(0xc000039e80, 0x1, 0x1)
D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
D:/program_data/go/DownloadBot/main.go:14
main.locLan(0xc00001471a, 0x5)
D:/program_data/go/DownloadBot/utils.go:69 +0xba
main.init.0()
D:/program_data/go/DownloadBot/main.go:26 +0x181`
不知道是不是我配置的问题,一旦运行就会报错

下载重复的任务会自动停止

下载好的文件已经删掉了,但还是会停止。
从aria2ng中把已完成任务全删了,才可以继续下载。
这里希望能够自定义

硬盘使用占比错误,无数据

image

如图,使用了目前最新的源码编译运行的,系统是Linux hostname #30~18.04.1-Ubuntu SMP Tue Oct 20 11:09:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

编译过程是按照项目说明文档来的

上傳Google drive報錯

λ go run drive.go struct.go Aria2.go main.go Telegram.go utils.go
2021/02/19 21:45:17 配置信息加载完成!
2021/02/19 21:45:17 与 ws://127.0.0.1:6800/jsonrpc 连接中
2021/02/19 21:45:17 Aria2 websocket连接已建立!Aria2版本:1.35.0
2021/02/19 21:45:17 已登入授权账户 xxxxxxx_DownloadBot
2021/02/19 21:45:34 Aria2Data
2021/02/19 21:45:34 Unable to create folder: Post "https://www.googleapis.com/drive/v3/files?alt=json&prettyPrint=false": oauth2: token expired and refresh token is not set
panic: Unable to create folder: Post "https://www.googleapis.com/drive/v3/files?alt=json&prettyPrint=false": oauth2: token expired and refresh token is not set

goroutine 50 [running]:
log.Panicf(0xa48e7b, 0x1b, 0xc000435dc8, 0x1, 0x1)
C:/Program Files/Go/src/log/log.go:361 +0xc7
googledrive.GetAllFile(0xc00001ae61, 0x9, 0x0, 0x0, 0x0, 0xc000272080, 0x602fc0fe, 0xc0004084c8, 0x18, 0xc0004ae108, ...)
C:/DownloadBot/vendor/googledrive/gdUpload.go:124 +0x39e
googledrive.Upload(0xc0005383c0, 0x30, 0xc00001ae61, 0x9, 0xa67278, 0xa67280)
C:/DownloadBot/vendor/googledrive/gdUpload.go:240 +0x46e
created by main.uploadDFToGoogleDrive
C:/DownloadBot/drive.go:61 +0x14b
exit status 2

還有config.json的downloadFolder設置不了,它會下載到Aria2設置/默認的位置。留空的話啓動會報錯。

image

遇到的一个问题,ssh要一直连

ssh连接,并且输入一次./DownloadBot,之后才会有消息提醒,一旦退出ssh,再点“正在下载”,点击按钮机器人没有任何提示,直到再次ssh连接,然后执行./DownloadBot才正常,退出又没有了,如此反复,请问大佬知道怎么解决?

机器人上传OneDrive报错

./DownloadBot
2022/03/16 15:31:27 Configuration information loading completed!
2022/03/16 15:31:27 Connecting to ws://127.0.0.1:5800/jsonrpc
2022/03/16 15:31:27 Aria2 websocket connection established! Aria2 version 1.36.0
2022/03/16 15:31:29 Login to authorized account pigkie_bot
2022/03/16 15:32:43 [{b24daa85dc263312}] Download started!
2022/03/16 15:32:45 [{b24daa85dc263312}] Download completed!
2022/03/16 15:33:11 Failed to Restore :EOF
panic: Failed to Restore :EOF

goroutine 97 [running]:
log.Panicf(0x661497, 0x15, 0x40002c7f38, 0x1, 0x1)
D:/program_app/go/src/log/log.go:358 +0xa8
onedrive.restore.func1(0x40005086d0, 0x4000266240, 0x6831e8, 0x6831f0, 0x40003ec140, 0x3b, 0x4000262020, 0x40004de5a0, 0x30, 0x4000262038, ...)
D:/program_data/go/DownloadBot/vendor/onedrive/onedrive.go:104 +0x1f0
created by onedrive.restore
D:/program_data/go/DownloadBot/vendor/onedrive/onedrive.go:94 +0x174

TG显示:
********, [2022/3/16 15:32]
[{b24daa85dc263312}] Download started!

[{DownloadBot_0.0.5_freebsd_arm64.tar.gz}] Download completed!

File: downloads/DownloadBot_0.0.5_Linux_arm64.tar.gz Start upload to OneDrive
Accounts:********
File less than 4MB, go to small file channel, uploading in progress

File: downloads/DownloadBot_0.0.5_freebsd_arm64.tar.gz Start upload to OneDrive
Accounts:********
File less than 4MB, go to small file channel, uploading in progress

多用户机器人使用

希望可以增加多用户使用

  • config.json user-id 允许多个用户
  • config.json group-id 允许群组使用

BUG: Google drive 无法成功创建配置

创建google drive上传配置时,程序要求输入跳转网址所得代码
输入进tgbot后会提示为 未知的下载链接,请重新检查
因此无法成功授权google drive

希望能修复这个bug,感谢开发者

Help!

Not a issue
Any docs or
support to deploy on online platforms like heroku, vercel, others ❤️

上传重复的问题

情况描述

对于 G Drive, 多次上传将产生多个文件夹
对于 G Drive, 多次上传将产生多个文件夹



对于 onedrive,多次上传将产生带后缀的文件(虽然在同文件夹中),


并且onedrive无法上传大文件

tg 聊天记录

...There was a connection problem when uploading downloads/100MB.bin. Retrying. It's the 9 times retrying

DownloadFolder upload to OneDrive complete

在输出上述内容后,程序报错退出

2021/05/24 19:06:20 Failed to Restore :The Content-Range header length does not match the provided number of bytes.
panic: Failed to Restore :The Content-Range header length does not match the provided number of bytes.

goroutine 70 [running]:
log.Panicf(0xaef62c, 0x15, 0xc0001e3f40, 0x1, 0x1)
        D:/program_app/go/src/log/log.go:358 +0xc0
onedrive.restore.func1(0xc000548670, 0xc00019bc20, 0xb114b8, 0xb114c0, 0xc0004c3620, 0x29, 0xc0000b2288, 0xc00051be00, 0x13, 0xc0000b22b8, ...)
        D:/program_data/go/DownloadBot/vendor/onedrive/onedrive.go:104 +0x299
created by onedrive.restore
        D:/program_data/go/DownloadBot/vendor/onedrive/onedrive.go:94 +0x207

panic: stat : no such file or directory

系统环境 Debian 10 x64
在配置完成 config.json 文件后,运行 DownloadBot 二进制文件时报错

报错信息如下
2021/01/24 13:21:09 stat : no such file or directory
panic: stat : no such file or directory
goroutine 1 [running]:
log.Panic(0xc000093e80, 0x1, 0x1)
        D:/program_app/go/src/log/log.go:351 +0xac
main.dropErr(...)
        D:/program_data/go/DownloadBot/main.go:14
main.locLan(0xc0000a867a, 0x5)
        D:/program_data/go/DownloadBot/utils.go:69 +0xba
main.init.0()
        D:/program_data/go/DownloadBot/main.go:26 +0x181

Help with setting up bot

Tutorial have literally 3 steps. I just found aria2 so tutorial covering setting it up (can't find good one online) would be great. To me this tutorial sems like it's telling you to download, configurate and run and that's it but how I can do that? Btw it's possible to set it up on azure?

运行./DownloadBot时报错

2021/11/30 21:38:27 dial tcp 127.0.0.1:6800: connect: connection refused
panic: dial tcp 127.0.0.1:6800: connect: connection refused

goroutine 1 [running]:
log.Panic(0xc00069fec0, 0x1, 0x1)
/usr/local/go/src/log/log.go:354 +0xae
main.dropErr(...)
/tmp/Down/DownloadBot/main.go:14
main.aria2Load()
/tmp/Down/DownloadBot/Aria2.go:66 +0x129
main.main()
/tmp/Down/DownloadBot/main.go:32 +0x4d

[feature request]请求添加Telegram文件、视频自动转直链下载功能

之前用的是tele-aria2,发现这个可以选择需要下载的文件,更好用。
希望能够增加Tg的直链下载功能,就是转发到bot的视频和文件可以自动提取直链发送到aria进行下载。目前,按照一个repo部署了直链提取功能,然后想要发送到aria需要:
1、转发文件到另外一个bot提取直链
2、将直链复制到downloadbot发送到aria下载
步骤较为繁琐。如果downloadbot能够内置该功能就更好了。
附:用于提取直链的repo

一次启动就只能下一个磁力

一次启动就只能下一个磁力
再添加磁力就自动暂停,但是又不出现文件选择框,然后就卡死了,其他命令也失效了
image

无法移动至挂载的网盘?

下载时一段时间后就停止下载,查看挂载目录也没有文件。vps是justhost小盘鸡,常常导致磁盘满盈...

授权失败

国际版团队/组织盘提示要管理员同意。但管理员一般很难联系。
能否降低要求,账户授权即可

设置的下载目录不起作用

这是我的config.json
{
"aria2-server": "ws://127.0.0.1:6800/jsonrpc",
"aria2-key": "xxx",
"bot-key": "123:xxx",
"user-id": "123",
"max-index": 10,
"sign": "Main Aria2",
"language": "zh-CN",
"downloadFolder": "/root/Download",
"moveFolder":"/root/OneDrive"
}
但是文件并没有下载到/root/Download下,而是下载到了/usr/local/caddy/www/aria2/Download/下

请问这个功能实现了吗?

对于大bt文件进行根据硬盘大小分段下载,每次都下载一部分,然后上传网盘,删除再下载其他部分,直到下载完所有文件

文件名称带有下划线会触发bug导致程序停止运行

报错日志

{"ChatID":*********,"ChannelUsername":"","ReplyToMessageID":0,"ReplyMarkup":{"inline_keyboard":[[{"text":"1","callback_data":"f9b7e1d8b6b60b9a:1"}]]},"DisableNotification":false,"Text":"停止哪一个?\n1: [电影天堂www.dytt89.com]发财日记-2021_HD国语中字.mp4","ParseMode":"Markdown","DisableWebPagePreview":false}

2021/02/14 17:22:00 Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 65

panic: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 65

https://community.home-assistant.io/t/telegram-bot-error-sending-messags-with/43889

运行后报错 unexpected EOF

2021/12/09 00:07:16 Configuration information loading completed!
2021/12/09 00:07:16 unexpected EOF
panic: unexpected EOF

goroutine 1 [running]:
log.Panic(0xc0005efec0, 0x1, 0x1)
/Down/go/src/log/log.go:354 +0xae
main.dropErr(...)
/Down/DownloadBot/main.go:14
main.aria2Load()
/Down/DownloadBot/Aria2.go:66 +0x129
main.main()
/Down/DownloadBot/main.go:32 +0x4d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.