python库可以同时观看和下载torrents
torrent-dl的Python项目详细描述
爆米花时间是一个非常酷的解决方案,直接播放种子,同时它被下载在后台,如果你能让其中一个安装工作。我真的很喜欢peerflix,它很管用。
这是我心爱的peerflix到python的端口。我真的需要把它打包,这样我就可以得到它:)
你可以同时观看和下载一个激流。它还支持媒体播放器的随机和增量搜索功能。
你所要做的就是Torrent DL[Magnet Link]
一旦下载了文件的某一部分,它将根据您的网速自动开始播放。
建立在[pyflix](https://github.com/animeshkundu/pyflix)上。包含Torrent库和媒体流。你可以在上面做些很棒的东西。
在ubuntu上安装
sudo apt get install libtorrent-rasterbar8 python libtorrent
pip install-r requirements.txt
在Mac OS上安装
brew更新
brew安装caskroom/cask/brew cask
brew install boost–从源代码构建–使用python–universal
brew安装libtorrent rasterbar–启用python绑定–使用python–使用boost python=mt
sudo ln-s/usr/local/lib/python2.7/site-packages/libtorrent.so/library/python/2.7/site-packages/。
sudo ln-s/usr/local/lib/python2.7/site-packages/python_libtorrent-1.0.3-py2.7.egg-info/library/python/2.7/site-packages/。
pip install-r requirements.txt
用法
pyflix[-h][-serve][-port][-download下载][-verbose][-player player]磁铁
位置参数:
magnet The magnet link to download
可选参数:
-h, --help show this help message and exit —serve Do not run VLC
--port PORT, -p PORT The port where the stream will be served —download DOWNLOAD, -d DOWNLOAD The path where the torrent will be downloaded
--verbose Show _all_ the logs —player PLAYER Only _vlc_ for now