用python3编写的一个简单的XDCC下载程序

xdcc的Python项目详细描述


目录

  1. Description
  2. Install
  3. How it works
  4. How to use
    1. Some examples
  5. Notes
  6. License

imgimgimg

Description

xdcc is a simple, one file, XDCC下载器是用python编写的,因此它应该可以在每一个 安装了python3。在

Install

This software is available as a PyPi包。安装很简单,只是打字

pip install xdcc

对于系统安装或

^{pr2}$

安装到用户的HOME目录中。在

How it works

This program uses a small IRC client library, https://github.com/jaraco/irc,要连接到指定的服务器,请加入 选择通道(如果在命令行上指定了某些通道),并将ctcp消息发送到XDCC bot请求 所需的文件。如果最后一部分进展顺利,那么我们开始通过DCC接收文件。在

如何使用

xdcc -s <server-name> -p <port-number> -c <channel>  botname [action] [packs]

如果没有指定serverport number选项,则默认服务器和端口为irc.rizon.net网站 分别是6670。如果没有指定频道,则程序根本不加入任何频道。在

一些例子

将bot的文件列表打印到stdout:

xdcc --stdout 'YOUR-BOT-NAME-HERE' list

下载软件包编号为500501502503和510的文件:

xdcc 'YOUR-BOT-NAME-HERE' send '500-503,510'

同上,但假设bot要求您登录特定的频道:

xdcc -c '#ChannelNameHere' 'YOUR-BOT-NAME-HERE' send '500-503,510'

要获得更多选项,只需在shell中键入xdcc --help

usage: xdcc [-h] [--server SERVER] [--channel CHANNEL] [--port PORT] [--stdout] [--nickname NICKNAME] [--verbose]
	    bot {list,send} [packs]

positional arguments:
  bot                   The XDCC Bot name.
  {list,send}           Action to take. Use 'list' for get the file list from the bot. Use 'send' to get a file from the bot.
  packs                 Packs numbers of the desired files. Ex: '50-62,64,66,70-80'.

optional arguments:
  -h, --help            show this help message and exit
  --server SERVER, -s SERVER
			The server to connect. The default is irc.rizon.net.
  --channel CHANNEL, -c CHANNEL
			The channel to join. The default is to not join in any server.
  --port PORT, -p PORT  The port number of the server. The default is 6670.
  --stdout, -t          When used with the 'list' action, print the contents of the list file to the stdout.
  --nickname NICKNAME, -n NICKNAME
			Nickname to be used in the server. If this option is not provided, a random permutation of 'anonymous' will
			be used.
  --verbose, -v         Enable verbose mode.

注释

我用过测试。如果你遇到一些机器人处理DCC不同,让我知道打开一个问题 或者请求拉取。在

许可证

MIT License

Copyright (c) 2020 Thiago Teodoro Pereira Silva

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在ElasticSearch中将SearchHit转换为Java对象   第三方库类的java重写XmlAdapter   java如何使用动画类获得平滑的动画效果?   Java PDFBox如果文本内容超过PDF的第一页,如何添加新页面?   Java二叉搜索树u根到最近叶的距离   java什么是diff Scanner和BufferedReader   java如何设计不生成并行数组的程序   java多次声明变量会降低执行速度吗?   java如何使用JXLAPI读取下拉列表的值   多线程为什么自定义阻塞队列在Java中不是线程安全的   java在一个变量中每输入1000个单位,就从另一个变量中减去1?   java Mapstruct通用映射器   Java中的类能否确定它是否已被修改?   java如何在MogoOperations聚合函数中定义输出类型?