BTSU is a torrent website project, powered by p2pspider and django.
Online Demo: BTSU Torrents
-
Install Node.js
sudo apt-get install nodejs nodejs-legacy npm -y
-
Install dependent packages
cd p2pspider npm install -g
-
Install pm2 and run index.js with pm2 cluster mode
sudo npm install pm2 -g cd p2pspider sudo pm2 start index.js -i 0
All torrent files which get from DHT Network will be saved in p2pspider/torrents
, need to use transmission
to parse them and save hash
, name
, magnet
and info
into database.
-
Install transmission
sudo apt-get install transmission-cli -y
-
Parse torrents and save to database
# python utils/tor2db.py <torrents_folder> <database_path> python utils/tor2db.py p2pspider/torrents btsu/btsu/torrents.db
BTSU is a django project, please update the {your_code_path}
in btsu/btsu/view.py
before you run the server.
# python {your_code_path}/btsu/manage.py runserver 0.0.0.0:{your_port}
python btsu/btsu/manage.py runserver 0.0.0.0:1234
keep_running.sh
is a script which can keep the BTSU running and restart it when the server down.
Please update the {your_code_path}
inside before you use it.
fs_watchdog.py
is a script which can watch torrents folder and update database while get new torrent.
> python fs_watchdog.py <torrent_folder> <database>