#!/usr/bin/env python3 import time import xmlrpc.client as xmlrpclib from pathlib import Path s = xmlrpclib.ServerProxy('http://localhost:4800/rpc') path=Path('/srv/dl') # All torrents #torrents=sorted(list(path.glob('**/satnogs-observations-*/satnogs-observations-*_archive.torrent'))) # Added torrents # dt-10 torrents=sorted(list(path.glob('**/satnogs-observations-0001?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0002?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0003?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0004?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0005?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0006?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0007?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0008?0001-000??0000/satnogs-observations-*_archive.torrent'))) torrents=sorted(list(path.glob('**/satnogs-observations-0009?0001-000??0000/satnogs-observations-*_archive.torrent'))) for i in torrents: print(i.name) s.aria2.addTorrent("token:yajnuAdCemNathNojdi", xmlrpclib.Binary(open(i, mode='rb').read())) time.sleep(10)