john hoffman的原始bittorrent的分叉,我们做了一些修改并将其用作torrent下载库
atproject的Python项目详细描述
#atproject
因为这个包正在开发中,所以我们还没有上传到pypi。当这个项目足够好时,
我们将其上传到pypi,届时,用户可以使用“pip install acadesttorrents”安装本模块。
- 如何安装:
在终端中复制以下命令:
如果您有管理员权限:
sudo pip install git+https://github.com/liuyifei0226/atproject
如果您没有管理员权限,请使用:
pip install git+https://github.com/liuyifei0226/atproject–用户
- 如何使用:
After installing the Academictorrents, enter python in terminal, get into python commond line:
python
and you’ll see
>>>
这意味着你现在在python中。
(2)在python中导入acadelltorrents。 为了方便起见,您可以按以下方式导入:
import academictorrents as at
(3)下载文件。 使用.get(“”)处的命令下载所需的文件。在这里你应该注意你的当前路径应该高于你保存.torrent文件的文件夹。例如,如果将.torrent文件放在/users/abc/downloads文件夹中,则应在downloads或abc下载该文件。
>>> at.get("path/torrentname.torrent")
当您看到类似
saving: devinberg.com_471592PB.pdf (0.2 MB) percent done: 0.0 time left: download to: /Users/ChunjieXu/devinberg.com_471592PB.pdf download rate: 0.0 kB/s upload rate: 0.0 kB/s share rating: 0.000 (0.0 MB up / 0.0 MB down) seed status: 1 seen now, plus 0.000 distributed copies peer status: 1 seen now, 0.0% done at 0.0 kB/s
saving: devinberg.com_471592PB.pdf (0.2 MB) percent done: 86.4 time left: complete! download to: /Users/ChunjieXu/devinberg.com_471592PB.pdf download rate: 29.6 kB/s upload rate: 0.0 kB/s share rating: 0.000 (0.0 MB up / 0.2 MB down) seed status: 4 seen now, plus 0.000 distributed copies peer status: 0 seen now, 0.0% done at 0.0 kB/s
saving: devinberg.com_471592PB.pdf (0.2 MB) percent done: 100 time left: Download Succeeded! download to: /Users/ChunjieXu/devinberg.com_471592PB.pdf download rate: upload rate: 0.0 kB/s share rating: 0.000 (0.0 MB up / 0.2 MB down) seed status: 4 seen now, plus 0.000 distributed copies peer status: 0 seen now, 0.0% done at 0.0 kB/s
恭喜你!这意味着你的学术洪流作品完美。您可以按“control+c”退出并返回python。