Giter VIP home page Giter VIP logo

torrt's Introduction

torrt

https://github.com/idlesign/torrt

image

image

image

Description

Automates torrent updates for you.

torrt automatically checks your favourite torrent tracker sites, where torrents are organized as articles (i.e forum-like tracker), to verify whether specific torrents have been updated (e.g. torrent bundling some TV-series is updated with a new episode), and instructs your torrent client to download new files.

torrt can function both as a console application and Python module.

Trackers

Automatic updates are available for:

Torrent clients

torrt is able to cooperate with the following torrent clients:

Notifications

torrt is able to send update notifications using:

Bots

torrt can be managed using messenger's bots:

Documentation

http://torrt.readthedocs.org/

torrt's People

Contributors

a8t3r avatar alexlitvinenko avatar altracer avatar dmzkrsk avatar idlesign avatar necrokote avatar st7105 avatar tatyushev-ms avatar theonedemon avatar toshka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torrt's Issues

How to use with Deluge?

I have all dependencies (python 3.7, Deluge, WebAPI plugin)
Do I install it somehow?
Do I use console command? If so, how do I start console?
Please provide noob friendly instructions
Your docs provide no such things besides for Transmission (Quickstart)
And even then, where do I enter > torrt ... commands?
Is it Windows or Python console?
I'm so confused please halp

can't add rutracker torrents - download link not found

using the example from the quickstart guide i am unable to add a torrent from rutracker

torrt add_torrent http://rutracker.org/forum/viewtopic.php?t=4430338 --verbose
DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing RPC classes ...
DEBUG: Registering `deluge` from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering `qbittorrent` from <class 'torrt.rpc.qbittorrent.QBittorrentRPC'> ...
DEBUG: Registering `transmission` from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering `utorrent` from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing Tracker classes ...
DEBUG: Registering `tr.anidub.com` from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering `kinozal.tv` from <class 'torrt.trackers.kinozal.KinozalTracker'> ...
DEBUG: Registering `nnm-club.me` from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering `rutor.org` from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering `rutracker.org` from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Importing Notifier classes ...
DEBUG: Registering `email` from <class 'torrt.notifiers.mail.EmailNotifier'> ...
DEBUG: Registering `telegram` from <class 'torrt.notifiers.telegram.TelegramNotifier'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file /home/mark/.torrt/config.json ...
DEBUG: Spawning `DelugeRPC` object with the given settings ...
DEBUG: Registering `deluge` from <torrt.rpc.deluge.DelugeRPC object at 0x7f42775469d0> ...
DEBUG: Spawning `RuTrackerTracker` object with the given settings ...
DEBUG: Registering `rutracker.org` from <torrt.trackers.rutracker.RuTrackerTracker object at 0x7f4277546a10> ...
DEBUG: Adding torrent from `http://rutracker.org/forum/viewtopic.php?t=4430338` ...
DEBUG: Downloading torrent file from `http://rutracker.org/forum/viewtopic.php?t=4430338` ...
DEBUG: Picking a mirror ...
DEBUG: Probing mirror: `http://rutracker.org` ...
DEBUG: Starting new HTTP connection (1): rutracker.org
DEBUG: http://rutracker.org:80 "GET / HTTP/1.1" 301 178
DEBUG: http://rutracker.org:80 "GET /forum/index.php HTTP/1.1" 200 None
DEBUG: Fetching http://rutracker.org/forum/viewtopic.php?t=4430338 ...
DEBUG: Starting new HTTP connection (1): rutracker.org
DEBUG: http://rutracker.org:80 "GET /forum/viewtopic.php?t=4430338 HTTP/1.1" 302 154
DEBUG: Starting new HTTPS connection (1): rutracker.org
DEBUG: https://rutracker.org:443 "GET /forum/viewtopic.php?t=4430338 HTTP/1.1" 200 None
ERROR: Cannot find torrent file download link at http://rutracker.org/forum/viewtopic.php?t=4430338
WARNING: Unable to get torrent from `http://rutracker.org/forum/viewtopic.php?t=4430338`
ERROR: Unable to add torrent from `http://rutracker.org/forum/viewtopic.php?t=4430338`

Tracker Kinozal many downloads [RUS]

Проблема заключается в том что на данном трекере есть ограничение на скачивание торентов в сутки.
Возможно ли исправить логику проверки обновление раздачи на трекере kinozal что бы сначала была проверка на изменение даты и если дата изменилась тогда уже скачивать торрент

nnm-club. Consecutive login attempt detected.. [rus]

При проверке обновлений торрентов начал получать ошибку "Consecutive login attempt detected...".
При этом проверка других трекеров завершается вместе с завершением программы.
Не уверен, что исправление правильное, но работает:

diff --git a/torrt/base_tracker.py b/torrt/base_tracker.py
index 6a9a2c8..33d0424 100644
--- a/torrt/base_tracker.py
+++ b/torrt/base_tracker.py
@@ -259,7 +259,8 @@ class GenericPrivateTracker(GenericPublicTracker):
         LOGGER.debug('Trying to login at %s ...', self.login_url)

         if self.logged_in:
-            raise TorrtTrackerException('Consecutive login attempt detected at `%s`' % self.__class__.__name__)
+            return True

         if not self.username or self.password is None:
             return False

SSL InsecurePlatform error when using Requests package

На старых версиях Python (у меня 2.7.6) при работе с HTTPS появляется warning:

InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning

На работу не влияет, но мешает

Решение есть тут: http://stackoverflow.com/questions/29099404/ssl-insecureplatform-error-when-using-requests-package

Мне помогла установка pip install 'requests[security]', но я не знаю как это правильно записать в setup.py

Telegram [RUS]

Доброго времени суток.
Описываю порядок действий и свой вопрос. Спасибо.
0 - система lubuntu - все стоит на 1 компе
1 - поставил питон 2.7
2 - поставил torrt
3 - настроил transmission rpc и nnm-club и telegram согластно инстурции
4 - проверил путем добавления ссылки на скачку через консоль
torrt add_torrent http://nnm-club.name...
результат: ссылка добавилась, торрент скачался и началась загрузка файла. файл удачно скачался.
Но при этом в чат телеграма ничего не пришло.
Вопросы:
1 Должно ли быть уведомление при первичной загрузке торрент файла?
2 Как можно запустить принудительно из консоли тестовое сообщение в телеграм?
Для проверки работы телеграма я сделал ссылку в формате и через браузер на той же машине отрыл ее.
Результат - сообщение пришло в чат.
Ссылка:
https://api.telegram.org/botTOKEN/sendMessage?chat_id=CHAT_ID&text=Hi

[yts.mx] tests failing because test URL was pulled by DCMA (?)

From one of the latest runs of coveralls:

RROR    torrt:utils.py:585 YtsmxTracker: div#movie-info not found on page
ERROR    torrt:utils.py:585 YtsmxTracker: Cannot find torrent file download link at https://yts.mx/movies/the-matrix-resurrections-2021
WARNING  torrt:utils.py:458 Unable to get torrent from `https://yts.mx/movies/the-matrix-resurrections-2021`

(source #78)

Seems like someone just pulled plug on latest Matrix at yts.mx ...

As a fix we can replace test-url for that tracker by some other URL, for example: https://yts.mx/movies/the-matrix-1999

But that made me thinking... Maybe testing tracker's ability to parse pages during auto-test process is not the wisest idea ?
Maybe it's better we mark all other tracker's tests with pytest mark tracker (or any other alternative) and don't run it during regular building process but allow users to test for tracker fittness themselves ?

Bypass 451

Neither rutracker nor telegram are directly accessible under all major ISPs in Russia. How do I connect torrt to these and localhost deluge api simultaneously?

Hint: often deluged+torrt+(?) bundle is often installed on a single dedicated node/home server, in my case, on a Raspberry Pi 3 running Raspbian Stretch.

I have already set up tor+arm and configured deluged to communicate with trackers via tor socks proxy, and that works. As far as I can see, we need to route https sessions to rutracker and telegram through some https proxy (but tor itself does only socks).

Tried HTTPS_PROXY=https://user:[email protected]:443 torrt walk, couldn't find a working proxy.

Tried torsocks torrt walk, and it wraps all outbound requests suitably for Tor but blocks localhost communication. Tried switching flags in torsocks.conf for Outbound and Inbound blocking, torrt (and other programs like curl, ping) errors out with 'DNS request failed'.

YTS.MX

Please make support for yts.mx

Errors with python-telegram-bot 12 [RUS]

Добрый вечер! Следуя документации, попробовал создать Телеграм-бота, но неуспешно. После torrt run_bots был выдан ряд предупреждений TelegramDeprecationWarning со ссылкой на документацию перехода на 12 версию. Ответить на сообщение /start бот уже не смог:

File "/home/askaniy/.local/lib/python3.10/site-packages/torrt/bots/telegram_bot.py", line 241, in command_start
    bot.send_message(update.message.chat_id, 'What do you want to do?', reply_markup=kb)
AttributeError: 'Update' object has no attribute 'send_message'

На Питоне программировать умею (не ботов) и наверное мог бы исправить (помучавшись), но лучше подожду исправления от автора. И да, вам не сложно привести образец использования интерфейса Питона? Документации не хватает.

Rutracker login fails [rus]

Во-первых, страница логина более не login.rutr..., а rutr... #8
Во-вторых, всё равно не могу авторизоваться, потому что мой ник состоит из двух слов на русском, разделённых пробелом.

[TelegramBot] not working on latest Python 3.10.2

Fresh install of torrt (v1.0.0):
pip install --user torrt[telegram]

torrt run_bots prints the following to log:

python3.10/site-packages/telegram/utils/request.py:40: UserWarning: python-telegram-bot wasn't properly installed. Please refer to README.rst on how to properly install.
warnings.warn("python-telegram-bot wasn't properly installed. Please refer to README.rst on "
ERROR: TelegramBot: You have not installed python-telegram-bot library.

Initial investigation showed, that torrt have it's dependency on telegram-bot-library hardwired as:
python-telegram-bot >=11.1.0, <12.0.0a0 with currently resolves to python-telegram-bot==11.1.0

inside the mentioned library is the following:

...
try:
    import telegram.vendor.ptb_urllib3.urllib3 as urllib3
    import telegram.vendor.ptb_urllib3.urllib3.contrib.appengine as appengine
    from telegram.vendor.ptb_urllib3.urllib3.connection import HTTPConnection
    from telegram.vendor.ptb_urllib3.urllib3.fields import RequestField
    from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout
except ImportError:
  try:
  ...
  except ImportError:
          warnings.warn(
              "python-telegram-bot wasn't properly installed. Please refer to README.rst on "
              "how to properly install."
          )
...

Trying even the first import by hand (import telegram.vendor.ptb_urllib3.urllib3 as urllib3) causes this:

  File "python3.10/site-packages/telegram/vendor/ptb_urllib3/urllib3/util/selectors.py", line 11, in <module>
    from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

So, it seems like it's the perfect time to update torrt's dependency.

PS: I'll look into this. Just creating this issue to keep track of it.

qbittorrent remove torrent bug. [RUS]

Возвращаясь опять к qbittorrent. командой walk торренты обновляет, то не удаляет старые.
Также новый добавленный торрент не добавляется в список зарегестрированных (в torrt list его нет)

Логи при обновлении.

INFO: Torrent walk is triggered
INFO: Torrent walk is started
INFO: Getting torrents from qbittorrent ...
INFO: Processing Foundation.S01.2160p.ATVP.WEB-DL.DDP5.1.Atmos.DoVi.by.DVT...
INFO: Torrent is updated
ERROR: QBittorrentRPC: Failed to query RPC http://127.0.0.1:8085/api/v2/torrents/delete: Bad Request
ERROR: QBittorrentRPC: Failed to query RPC rem_torrent: Bad Request
ERROR: Walk failed. Reason: Bad Request
INFO: Torrent walk is finished

Логи если попытаться удалить какой либо из торрентов.

~# /var/packages/py3k/target/usr/local/bin/torrt remove_torrent 548a334b9604bd1de1c9aec800ff9133c71b2e0b
INFO: Removing torrent 548a334b9604bd1de1c9aec800ff9133c71b2e0b (with data = False) ...
INFO: Removing torrent using qbittorrent RPC ...
ERROR: QBittorrentRPC: Failed to query RPC http://127.0.0.1:8085/api/v2/torrents/delete: Bad Request
ERROR: QBittorrentRPC: Failed to query RPC rem_torrent: Bad Request
Traceback (most recent call last):
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/rpc/qbittorrent.py", line 118, in query
raise QBittorrentRPCException(response.text.strip() or response.reason)
torrt.rpc.qbittorrent.QBittorrentRPCException: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/rpc/qbittorrent.py", line 123, in query
raise QBittorrentRPCException(f'{e}')
torrt.rpc.qbittorrent.QBittorrentRPCException: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/packages/py3k/target/usr/local/bin/torrt", line 8, in
sys.exit(process_commands())
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/main.py", line 206, in process_commands
remove_torrent(args['hash'], args['delete_data'])
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/toolbox.py", line 256, in remove_torrent
rpc_object.method_remove_torrent(hash_str, with_data=with_data)
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/rpc/qbittorrent.py", line 192, in method_remove_torrent
return self.auth_query(self.build_params('rem_torrent', {'data': data}))
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/rpc/qbittorrent.py", line 137, in auth_query
return self.query(data, files)
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/torrt/rpc/qbittorrent.py", line 128, in query
raise QBittorrentRPCException(f'{e}')
torrt.rpc.qbittorrent.QBittorrentRPCException: Bad Request

Concept: reorganization for daemon [RUS]

Для повышения гибкости приложения следует рассмотреть возможность и целесообразность запуска торрта фоновым процессом. Примерная схема:

20190211_204832

Из схемы видно, что фоновый процесс должен будет предоставлять возможность взаимодействия с собой других компонентов, таких как различные UI (CLI, Web), предположительно по HTTP API.

В качестве базы для приложения можно использовать каркас для веб-приложений, например Django. Благодаря каркасу можно будет дёшево и быстро развивать все подсистемы приложения. Так, например, можно перенести данные из файла конфигурации в БД (в портативном виде на sqlite), из коробки иметь решение по ограничению доступа к API/Web, а также решения для построения самого веб-интерфейса (с удобным управлением торрентами, настройками и пр).

Минусом использования полноценного каркаса типа Django является его размер, что может быть критично, например, для старых или маломощных NAS. Помимо этого, желательно использование свежих версий каркаса, что выливается в необходимость Python 3.5+, которого тоже может не быть на устройствах. Хотя торрт и участвует в LBC, и поддержка Python 2 будет выпилена в 2020-м, нужно подумать на сколько критична поддержка <3.5.

qBittorrent integration does not work for qBittorrent 4.2

Apparently qBittorrent changed their API in 4.1+, and older 4.0 and earlier methods, like querying /login, do not work any longer:

> torrt configure_rpc qbittorrent host=172.30.0.10 port=9099 user=<redacted> password=<redacted>
INFO: Configuring `qbittorrent` rpc ...
ERROR: Failed to query RPC `http://172.30.0.10:9099/login`:
ERROR: Failed to query RPC `login`:
ERROR: Failed to login using `http://172.30.0.10:9099/` RPC:
Traceback (most recent call last):
  File "/nix/store/i95ihm2jp5q0ngwjflw9hcihb5vgddk7-python3.7-torrt-0.14.0-dev/lib/python3.7/site-packages/torrt/rpc/qbittorrent.py", line 128, in query
    raise QBittorrentRPCException(response.text.strip())
torrt.rpc.qbittorrent.QBittorrentRPCException

New API is defined here.

Note that qBittorrent 4.1.0, the one where they had changed the API, is more than two years old (released on May 4th, 2018), so maybe it would be better to upgrade, or at least add a compatibility note somewhere so people would know what to expect.

[Transmission] Can't register torrents already in client using hash

Debug `register_torrent`
C:\Windows\system32>torrt register_torrent 65755778aff25ec7b8ec7485ad0ede24f0d65629 --verbose
DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing rpc ...
DEBUG: Registering `deluge` from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering `qbittorrent` from <class 'torrt.rpc.qbittorrent.QBittorrentRPC'> ...
DEBUG: Registering `transmission` from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering `utorrent` from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing trackers ...
DEBUG: Registering `tr.anidub.com` from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering `anilibria.tv` from <class 'torrt.trackers.anilibria.AnilibriaTracker'> ...
DEBUG: Registering `casstudio.tv` from <class 'torrt.trackers.casstudio.CasstudioTracker'> ...
DEBUG: Registering `kinozal.tv` from <class 'torrt.trackers.kinozal.KinozalTracker'> ...
DEBUG: Registering `nnm-club.me` from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering `rutor.org` from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering `rutracker.org` from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Importing notifiers ...
DEBUG: Registering `email` from <class 'torrt.notifiers.mail.EmailNotifier'> ...
DEBUG: Registering `telegram` from <class 'torrt.notifiers.telegram.TelegramNotifier'> ...
DEBUG: Importing bots ...
DEBUG: Registering `telegram` from <class 'torrt.bots.telegram_bot.TelegramBot'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Spawning `TransmissionRPC` object with the given settings ...
DEBUG: Registering `transmission` from transmission ...
DEBUG: Spawning `AnilibriaTracker` object with the given settings ...
DEBUG: Registering `anilibria.tv` from anilibria.tv ...
DEBUG: Spawning `RutorTracker` object with the given settings ...
DEBUG: Registering `rutor.org` from rutor.org ...
DEBUG: Spawning `RuTrackerTracker` object with the given settings ...
DEBUG: Registering `rutracker.org` from rutracker.org ...
DEBUG: Registering `65755778aff25ec7b8ec7485ad0ede24f0d65629` torrent ...
Traceback (most recent call last):
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Toyohara\AppData\Local\Programs\Python\Python37\Scripts\torrt.exe\__main__.py", line 7, in <module>
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\main.py", line 209, in process_commands
    register_torrent(args['hash'], url=args['url'])
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\toolbox.py", line 207, in register_torrent
    structure_torrent_data(cfg['torrents'], hash_str, torrent_data)
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\utils.py", line 438, in structure_torrent_data
    if not data.hash:
  File "c:\users\toyohara\appdata\local\programs\python\python37\lib\site-packages\torrt\utils.py", line 401, in _get_hash
    return self._hash or self.parsed.info_hash
AttributeError: 'NoneType' object has no attribute 'info_hash'
P.S. Unrelated, but is it possible to add a feature to remember which files were skipped from old torrent when updating?
Example (I want to NOT download "Bonus" folder)

image

Torrent removed from rutracker fails torrt walk

I have registered torrent with hash 518f22c40ac78b2dcb72cd8747926ed01266c812.
Every time I run torrt walk and it gets to this one it prints stacktrace and fails.

Traceback (most recent call last):
  File "/usr/local/bin/torrt", line 10, in <module>
    sys.exit(process_commands())
  File "/usr/local/lib/python3.7/dist-packages/torrt/main.py", line 197, in process_commands
    walk(forced=args['forced'], silent=True)
  File "/usr/local/lib/python3.7/dist-packages/torrt/toolbox.py", line 309, in walk
    updated = update_torrents(cfg['torrents'], remove_outdated=remove_outdated)
  File "/usr/local/lib/python3.7/dist-packages/torrt/toolbox.py", line 387, in update_torrents
    tracker_torrent = get_torrent_from_url(page_url)
  File "/usr/local/lib/python3.7/dist-packages/torrt/utils.py", line 455, in get_torrent_from_url
    torrent_info = tracker.get_torrent(url)
  File "/usr/local/lib/python3.7/dist-packages/torrt/base_tracker.py", line 377, in get_torrent
    parsed = parse_torrent(torrent_contents)
  File "/usr/local/lib/python3.7/dist-packages/torrt/utils.py", line 291, in parse_torrent
    return Torrent.from_string(torrent)
  File "/usr/local/lib/python3.7/dist-packages/torrentool/torrent.py", line 418, in from_string
    return cls(Bencode.read_string(string, byte_keys={'pieces'}))
  File "/usr/local/lib/python3.7/dist-packages/torrentool/bencode.py", line 189, in read_string
    return cls.decode(string, byte_keys=byte_keys)
  File "/usr/local/lib/python3.7/dist-packages/torrentool/bencode.py", line 167, in decode
    raise BencodeDecodingError(f'Unable to interpret `{char}` char.')
torrentool.exceptions.BencodeDecodingError: Unable to interpret `<` char.

Please contact me if you need more details.

Rutracker authorization failed

torrt --verbose configure_tracker rutracker.org username=user password=pass

DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing RPC classes ...
DEBUG: Registering `deluge` from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering `transmission` from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering `utorrent` from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing Tracker classes ...
DEBUG: Registering `tr.anidub.com` from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering `nnm-club.me` from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering `rutor.org` from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering `rutracker.org` from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file /home/nickolay/.torrt/config.json ...
DEBUG: Spawning `TransmissionRPC` object with the given settings ...
DEBUG: Registering `transmission` from <torrt.rpc.transmission.TransmissionRPC object at 0x7f5c4e577fd0> ...
INFO: Configuring `rutracker.org` tracker ...
DEBUG: Spawning `RuTrackerTracker` object with the given settings ...
DEBUG: Trying to login at http://login.rutracker.org/forum/login.php ...
DEBUG: Fetching http://login.rutracker.org/forum/login.php ...
WARNING: Login with given credentials failed
ERROR: Tracker `rutracker.org` configuration failed. Check your settings

In wireshark: POST request to "http://login.rutracker.org/forum/login.php" with 404 response.

utorrent rpc support [RU]

После нескольких фиксов возникла концептуальная проблема. А именно, в api utorrent в методе добавления торрента используется относительный путь (в принципе неподдерживается абсолютный путь, только относительный), а в возвращаемом списке всех торрентов уже абсолютный (известная проблема в utorrent).

В функции update_torrents происходит передача абсолютного пути при добавлении нового торрента:

            rpc_object.method_add_torrent(
                tracker_torrent,
                rpc_torrent['download_to'],
                params=rpc_torrent.get('params', None)
            )

Это приводит к постоянному дублированию:
/home/download/home/download/home/...

Варианты решения:

  • Хранить путь загрузки в TorrentData, а не использовать параметр из api.

NNMClubTracker обновить зеркала [RUS]

в файле trackers/nnmclub.py нужно заменить зеркала:

mirrors = ['nnm-club.name', 'nnmclub.to']

на

mirrors = ['nnmclub.to', 'nnmclub.ro']

зеркало nnm-club.nameуже не рабочее и при получении торрента висим 30 секунд ( по таймауту )

Anilibria сломался api

Перестал работать api первой версии, переделал код в anilibria.py чтобы работать с api_v3, но почему-то торрт пытается спарсить торрент с ссылки формата апи/ссылка для скачивания, хотя он уже скачан с правильной ссылки. Я не настолько хорошо разобрался в коде чтобы диагностировать проблему, так что было бы неплохо если кто-нибудь смог бы пофиксить остальное

изображение

Код anilibria.py, исправленный под новый api:

import re
from collections import defaultdict
from typing import List, Dict, Optional, Tuple

from ..base_tracker import GenericPublicTracker

REGEX_QUALITY = re.compile(r".+\[(.+)\]")
# This regex is used to remove every non-word character or underscore from quality string.
REGEX_NON_WORD = re.compile(r'[\W_]')
REGEX_RANGE = re.compile(r'\d+-\d+')

HOST: str = 'https://www.anilibria.tv'
API_URL: str ='https://api.anilibria.tv/v3/title'


class AnilibriaTracker(GenericPublicTracker):
    """This class implements .torrent files downloads for https://www.anilibria.tv tracker."""

    alias: str = 'anilibria.tv'

    test_urls: List[str] = [
        'https://www.anilibria.tv/release/sword-art-online-alicization.html',
    ]

    def __init__(self, quality_prefs: List[str] = None):

        super(AnilibriaTracker, self).__init__()

        if quality_prefs is None:
            quality_prefs = ['HDTVRip 1080p', 'HDTVRip 720p', 'WEBRip 720p']

        self.quality_prefs = quality_prefs

    def get_download_link(self, url: str) -> str:
        """Tries to find .torrent file download link at forum thread page and return that one."""

        available_qualities = self.find_available_qualities(url)

        self.log_debug(f"Available in qualities: {', '.join(available_qualities)}")

        if available_qualities:

            quality_prefs = []

            for pref in self.quality_prefs:
                pref = self.sanitize_quality(pref)

                if pref not in quality_prefs:
                    quality_prefs.append(pref)

            preferred_qualities = [quality for quality in quality_prefs if quality in available_qualities]

            if not preferred_qualities:
                self.log_info(
                    'Torrent is not available in preferred qualities: '
                    f"{', '.join(quality_prefs)}")

                quality, link = next(iter(available_qualities.items()))

                self.log_info(f'Fallback to `{quality}` quality ...')

                return link

            else:
                target_quality = preferred_qualities[0]
                self.log_debug(f'Trying to get torrent in `{target_quality}` quality ...')

                return available_qualities[target_quality]

        return ''

    def find_available_qualities(self, url: str) -> Dict[str, str]:
        """Tries to find .torrent download links in `Release` model
        Returns a dict where key is quality and value is .torrent download link.

        :param url: url to forum thread page

        """
        code = self.extract_release_code(url)

        json = self.api_get_release_by_code(code)

        if not json.get('status', False):
            self.log_error(f'Failed to get release `{code}` from API')
            return {}

        available_qualities = {}
        torrents = json['torrents']['list']
        series2torrents = defaultdict(list)
        # a release can consist of several torrents:
        #   1. episode ranges (different qualities),
        #   2. single episodes (different qualities) - a release is just aired,
        #   3. trailers,
        #   4. OVAs
        # we are trying to recognize `1` and `2`.
        for torrent in torrents:
            if REGEX_RANGE.match(torrent['episodes']['string']) or torrent['episodes']['string'] == json['torrents']['episodes']['string']:
                series2torrents[torrent['episodes']['string']].append(torrent)

        # some releases can be broken into several .torrent files, e.g. 1-20 and 21-41 - take the last one
        sorted_series = sorted(series2torrents.keys(), key=self.to_tuple, reverse=True)

        if not sorted_series:
            return {}

        for torrent in series2torrents[sorted_series[0]]:
            quality = self.sanitize_quality(torrent['quality']['string'])
            available_qualities[quality] = HOST + torrent['url']

        return available_qualities

    @staticmethod
    def extract_release_code(url: str) -> str:
        """Extracts anilibria release code from forum thread page.

        Example:

        `extract_release_code('https://www.anilibria.tv/release/kabukichou-sherlock.html')` -> 'kabukichou-sherlock'

        :param url: url to forum thread page

        """
        return url.replace(HOST + '/release/', '').replace('.html', '')

    @staticmethod
    def sanitize_quality(quality_str: Optional[str]) -> str:
        """Turn passed quality_str into common format in order to simplify comparison.

        Examples:

            * `sanitize_quality('WEBRip 1080p')` -> 'webrip1080p'
            * `sanitize_quality('WEBRip-1080p')` -> 'webrip1080p'
            * `sanitize_quality('WEBRip_1080p')` -> 'webrip1080p'
            * `sanitize_quality('')` -> ''
            * `sanitize_quality(None)` -> ''

        :param quality_str:

        """
        if quality_str:
            return REGEX_NON_WORD.sub('', quality_str).lower()

        return ''

    @staticmethod
    def to_tuple(range_str: str) -> Tuple[int, ...]:
        """ Turn passed range_str into tuple of integers.

        Examples:

            * `to_tuple('1-10')` -> (1, 10)

        :param range_str: series range string

        """
        return tuple(map(int, range_str.split('-')))

    def api_get_release_by_code(self, code: str) -> dict:
        """
        Get release json by passed `code` from Anilibria API.

        :param code: release code

        """
        response = self.get_response(API_URL + '?code=' + code, as_soup=False)

        if not response:
            return {}

        return response.json()

anilibria.tv Cloudflare capture [RUS]

Тесты падают из-за показа страницы с капчей.
https://travis-ci.org/idlesign/torrt/jobs/584944270

Нужно что-то придумать. Если капча обходится наличием неких кук, то их нужно установить до первого запроса. Если не обойти, то встает вопрос либо о том, жизнеспособна ли поддержка этого трекера, либо о том, как модифицировать тесты, чтобы они могли ожидать падения конкретного трекера и сообщали о нём в отчёте, но не останавливали весь набор тестов.

torrt doesn't download just incremental files but all of them once again

Hello,

Thx for the great app — it works great so far! One minor annoyance, though (and I'm not sure if this is by design or a bug).

I use Deluge and Filebot plugin with it. Upon download competition, Filebot (via Deluge plugin) renames files and moves them from my Downloads folder to TV Shows folder.

When torrt performs a walk, it removes the existing torrent from deluge and adds an updated one — but it doesn't instruct deluge to download only the new file — it downloads everything again. If files downloaded from original torrent were not renamed and moved that would not be an issue — deluge would detect existing files. But in my case, because original files were moved, deluge (naturally) downloads everything again.

Is there any way around my issue? Can support for such scenario be implemented in the next torrt release?

Thx in advance!

Add systemd service for run_bots [RUS]

Вместо супервизора можно использовать systemd, вот пример ( можно добавить в доку ):

# /etc/systemd/system/torrt_run_bots.service
[Unit]
Description=torrt telegram bot commands handler
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
#User=root
TimeoutSec=30
ExecStart=/usr/local/bin/torrt run_bots

[Install]
WantedBy=multi-user.target

после выполнить следующие команды:

systemctl enable torrt_run_bots
systemctl start torrt_run_bots

qbittorrent: 'savepath' is not a valid torrent file [RUS]

Используется qbittorrent 4.3.3 docker.
Торренты без параметра -d добавляются нормально, но при использовании параметра -d или при их обновлении возникает ошибка.

Вот логи.
П.С. Если что-то сделал не так, прошу сильно не ругать, я тут новичек.

~# /var/packages/py3k/target/usr/local/bin/torrt walk --verbose
DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing rpc ...
DEBUG: Registering deluge from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering qbittorrent from <class 'torrt.rpc.qbittorrent.QBittorrentRPC'> ...
DEBUG: Registering transmission from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering utorrent from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing trackers ...
DEBUG: Registering tr.anidub.com from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering anilibria.tv from <class 'torrt.trackers.anilibria.AnilibriaTracker'> ...
DEBUG: Registering casstudio.tv from <class 'torrt.trackers.casstudio.CasstudioTracker'> ...
DEBUG: Registering eniahd.com from <class 'torrt.trackers.eniahd.EniaHDTracker'> ...
DEBUG: Registering kinozal.tv from <class 'torrt.trackers.kinozal.KinozalTracker'> ...
DEBUG: Registering nnm-club.me from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering rutor.org from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering rutracker.org from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Importing notifiers ...
DEBUG: Registering email from <class 'torrt.notifiers.mail.EmailNotifier'> ...
DEBUG: Registering telegram from <class 'torrt.notifiers.telegram.TelegramNotifier'> ...
DEBUG: Importing bots ...
DEBUG: Registering telegram from <class 'torrt.bots.telegram_bot.TelegramBot'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file /root/.torrt/config.json ...
DEBUG: Spawning QBittorrentRPC object with the given settings ...
DEBUG: Registering qbittorrent from qbittorrent ...
DEBUG: Spawning EmailNotifier object with the given settings ...
DEBUG: Registering email from email ...
DEBUG: Spawning AnilibriaTracker object with the given settings ...
DEBUG: Registering anilibria.tv from anilibria.tv ...
DEBUG: Spawning KinozalTracker object with the given settings ...
DEBUG: Registering kinozal.tv from kinozal.tv ...
DEBUG: Spawning RutorTracker object with the given settings ...
DEBUG: Registering rutor.org from rutor.org ...
DEBUG: Spawning RuTrackerTracker object with the given settings ...
DEBUG: Registering rutracker.org from rutracker.org ...
INFO: Torrent walk is triggered
DEBUG: Loading configuration file /root/.torrt/config.json ...
INFO: Torrent walk is started
INFO: Getting torrents from qbittorrent ...
DEBUG: QBittorrentRPC: RPC action login ...
DEBUG: Fetching http://127.0.0.1:8085/api/v2/auth/login ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:8085
DEBUG: http://127.0.0.1:8085 "POST /api/v2/auth/login HTTP/1.1" 200 3
DEBUG: QBittorrentRPC: RPC action get_torrents ...
DEBUG: Fetching http://127.0.0.1:8085/api/v2/torrents/info ...
DEBUG: http://127.0.0.1:8085 "GET /api/v2/torrents/info HTTP/1.1" 200 1529
DEBUG: QBittorrentRPC: RPC action get_torrent ...
DEBUG: Fetching http://127.0.0.1:8085/api/v2/torrents/properties ...
DEBUG: http://127.0.0.1:8085 "POST /api/v2/torrents/properties HTTP/1.1" 200 795
INFO: Processing Foundation.S01.WEB-DL.720p.Rus.Eng...
DEBUG: Downloading torrent file from https://rutracker.org/forum/viewtopic.php?t=6114289 ...
DEBUG: RuTrackerTracker: Picking a mirror ...
DEBUG: RuTrackerTracker: Probing mirror: https://rutracker.org ...
DEBUG: Fetching https://rutracker.org ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET / HTTP/1.1" 301 162
DEBUG: https://rutracker.org:443 "GET /forum/index.php HTTP/1.1" 200 None
DEBUG: Fetching https://rutracker.org/forum/viewtopic.php?t=6114289 ...
DEBUG: https://rutracker.org:443 "GET /forum/viewtopic.php?t=6114289 HTTP/1.1" 200 None
DEBUG: RuTrackerTracker: Torrent download link found: https://rutracker.org/forum/dl.php?t=6114289
DEBUG: RuTrackerTracker: Downloading torrent file from https://rutracker.org/forum/dl.php?t=6114289 ...
DEBUG: Fetching https://rutracker.org/forum/dl.php?t=6114289 ...
DEBUG: https://rutracker.org:443 "GET /forum/dl.php?t=6114289 HTTP/1.1" 200 23209
DEBUG: Torrent was downloaded from https://rutracker.org/forum/viewtopic.php?t=6114289
DEBUG: Update is available
DEBUG: QBittorrentRPC: RPC action add_torrent ...
DEBUG: Fetching http://127.0.0.1:8085/api/v2/torrents/add ...
DEBUG: http://127.0.0.1:8085 "POST /api/v2/torrents/add HTTP/1.1" 415 46
ERROR: QBittorrentRPC: Failed to query RPC http://127.0.0.1:8085/api/v2/torrents/add: Error: 'savepath' is not a valid torrent file.
ERROR: QBittorrentRPC: Failed to query RPC add_torrent: Error: 'savepath' is not a valid torrent file.
ERROR: Unable to replace torrent: Error: 'savepath' is not a valid torrent file.
DEBUG: Loading configuration file /root/.torrt/config.json ...
DEBUG: Saving configuration file /root/.torrt/config.json ...
INFO: Torrent walk is finished

[Transmission] "walk"-ing deletes torrents

Upon using torrt walk torrents are deleted instead of updating (files are intact)

Debug `add_torrent`
C:\Windows\system32>torrt add_torrent https://rutracker.org/forum/viewtopic.php?t=5331180 --verbose
DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing rpc ...
DEBUG: Registering `deluge` from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering `qbittorrent` from <class 'torrt.rpc.qbittorrent.QBittorrentRPC'> ...
DEBUG: Registering `transmission` from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering `utorrent` from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing trackers ...
DEBUG: Registering `tr.anidub.com` from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering `anilibria.tv` from <class 'torrt.trackers.anilibria.AnilibriaTracker'> ...
DEBUG: Registering `casstudio.tv` from <class 'torrt.trackers.casstudio.CasstudioTracker'> ...
DEBUG: Registering `kinozal.tv` from <class 'torrt.trackers.kinozal.KinozalTracker'> ...
DEBUG: Registering `nnm-club.me` from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering `rutor.org` from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering `rutracker.org` from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Importing notifiers ...
DEBUG: Registering `email` from <class 'torrt.notifiers.mail.EmailNotifier'> ...
DEBUG: Registering `telegram` from <class 'torrt.notifiers.telegram.TelegramNotifier'> ...
DEBUG: Importing bots ...
DEBUG: Registering `telegram` from <class 'torrt.bots.telegram_bot.TelegramBot'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Spawning `TransmissionRPC` object with the given settings ...
DEBUG: Registering `transmission` from transmission ...
DEBUG: Spawning `AnilibriaTracker` object with the given settings ...
DEBUG: Registering `anilibria.tv` from anilibria.tv ...
DEBUG: Spawning `RutorTracker` object with the given settings ...
DEBUG: Registering `rutor.org` from rutor.org ...
DEBUG: Spawning `RuTrackerTracker` object with the given settings ...
DEBUG: Registering `rutracker.org` from rutracker.org ...
DEBUG: Adding torrent from `https://rutracker.org/forum/viewtopic.php?t=5331180` ...
DEBUG: Downloading torrent file from `https://rutracker.org/forum/viewtopic.php?t=5331180` ...
DEBUG: RuTrackerTracker: Picking a mirror ...
DEBUG: RuTrackerTracker: Probing mirror: `https://rutracker.org` ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET / HTTP/1.1" 301 162
DEBUG: https://rutracker.org:443 "GET /forum/index.php HTTP/1.1" 200 None
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/viewtopic.php?t=5331180 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/viewtopic.php?t=5331180 HTTP/1.1" 200 None
DEBUG: RuTrackerTracker: Torrent download link found: https://rutracker.org/forum/dl.php?t=5331180
DEBUG: RuTrackerTracker: Downloading torrent file from https://rutracker.org/forum/dl.php?t=5331180 ...
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/dl.php?t=5331180 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/dl.php?t=5331180 HTTP/1.1" 200 32219
DEBUG: Torrent was downloaded from `https://rutracker.org/forum/viewtopic.php?t=5331180`
DEBUG: TransmissionRPC: RPC method `torrent-add` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 409 581
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 145
DEBUG: Registering `298f99aad2c59e7020b9779ea6808d390afa2f95` torrent ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Saving configuration file C:\Users\Toyohara\.torrt\config.json ...
INFO: Torrent from `https://rutracker.org/forum/viewtopic.php?t=5331180` is added within `transmission`
config.json (credentials hidden)
{
  "time_last_check": 1598466246,
  "walk_interval_hours": 24,
  "trackers": {
      "rutracker.org": {
          "username": "username",
          "query_string": null,
          "cookies": {
              "bb_session": "session",
              "bb_ssl": "1"
          },
          "password": "password"
      }
  },
  "rpc": {
      "transmission": {
          "url": "http://127.0.0.1:9091/transmission/rpc",
          "enabled": true,
          "host": "127.0.0.1",
          "user": null,
          "password": null,
          "port": "9091"
      }
  },
  "torrents": {
      "c0424991902bdba637dc1647d4b0a2869dbd1b21": {
          "hash": "c0424991902bdba637dc1647d4b0a2869dbd1b21",
          "name": "No Mans Sky by xatab",
          "url": "https://rutracker.org/forum/viewtopic.php?t=5932207",
          "url_file": "https://rutracker.org/forum/dl.php?t=5768151",
          "page": {
              "title": "No Man's Sky [P] [RUS + ENG + 11 / RUS + ENG + 10] (2016, VR Supported) (2.62 + 1 DLC) :: RuTracker.org",
              "cover": "",
              "date_updated": ""
          }
      },
      "1c035226e707d6712674a9048d09c888bfbe81ee": {
          "hash": "1c035226e707d6712674a9048d09c888bfbe81ee",
          "name": "Frostpunk.Game.of.The.Year.Edition.GOG-InsaneRamZes",
          "url": "https://rutracker.org/forum/viewtopic.php?t=5932207",
          "url_file": "https://rutracker.org/forum/dl.php?t=5932207",
          "page": {
              "title": "Frostpunk: Game of the Year Edition [L] [RUS + ENG + 10 / ENG] (2018) (1.6 + 3 DLC) [GOG] :: RuTracker.org",
              "cover": "",
              "date_updated": ""
          }
      },
      "298f99aad2c59e7020b9779ea6808d390afa2f95": {
          "hash": "298f99aad2c59e7020b9779ea6808d390afa2f95",
          "name": "setup_rimworld_1.2.2723",
          "url": "https://rutracker.org/forum/viewtopic.php?t=5331180",
          "url_file": "https://rutracker.org/forum/dl.php?t=5331180",
          "page": {
              "title": "RimWorld [L] [RUS + ENG + 26] (2018) (1.2.2723 + 1 DLC) [GOG] :: RuTracker.org",
              "cover": "",
              "date_updated": ""
          }
      }
  },
  "notifiers": {},
  "bots": {}
}
Debug `walk`
C:\Windows\system32>torrt walk -f --verbose
DEBUG: Bootstrapping torrt environment ...
DEBUG: Importing rpc ...
DEBUG: Registering `deluge` from <class 'torrt.rpc.deluge.DelugeRPC'> ...
DEBUG: Registering `qbittorrent` from <class 'torrt.rpc.qbittorrent.QBittorrentRPC'> ...
DEBUG: Registering `transmission` from <class 'torrt.rpc.transmission.TransmissionRPC'> ...
DEBUG: Registering `utorrent` from <class 'torrt.rpc.utorrent.UTorrentRPC'> ...
DEBUG: Importing trackers ...
DEBUG: Registering `tr.anidub.com` from <class 'torrt.trackers.anidub.AniDUBTracker'> ...
DEBUG: Registering `anilibria.tv` from <class 'torrt.trackers.anilibria.AnilibriaTracker'> ...
DEBUG: Registering `casstudio.tv` from <class 'torrt.trackers.casstudio.CasstudioTracker'> ...
DEBUG: Registering `kinozal.tv` from <class 'torrt.trackers.kinozal.KinozalTracker'> ...
DEBUG: Registering `nnm-club.me` from <class 'torrt.trackers.nnmclub.NNMClubTracker'> ...
DEBUG: Registering `rutor.org` from <class 'torrt.trackers.rutor.RutorTracker'> ...
DEBUG: Registering `rutracker.org` from <class 'torrt.trackers.rutracker.RuTrackerTracker'> ...
DEBUG: Importing notifiers ...
DEBUG: Registering `email` from <class 'torrt.notifiers.mail.EmailNotifier'> ...
DEBUG: Registering `telegram` from <class 'torrt.notifiers.telegram.TelegramNotifier'> ...
DEBUG: Importing bots ...
DEBUG: Registering `telegram` from <class 'torrt.bots.telegram_bot.TelegramBot'> ...
DEBUG: Initializing objects registries from configuration file ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Spawning `TransmissionRPC` object with the given settings ...
DEBUG: Registering `transmission` from transmission ...
DEBUG: Spawning `AnilibriaTracker` object with the given settings ...
DEBUG: Registering `anilibria.tv` from anilibria.tv ...
DEBUG: Spawning `RutorTracker` object with the given settings ...
DEBUG: Registering `rutor.org` from rutor.org ...
DEBUG: Spawning `RuTrackerTracker` object with the given settings ...
DEBUG: Registering `rutracker.org` from rutracker.org ...
INFO: Torrent walk is triggered
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
INFO: Torrent walk is started
INFO: Getting torrents from `transmission` ...
DEBUG: TransmissionRPC: RPC method `torrent-get` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 409 581
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 1089
INFO:   Processing `No Mans Sky by xatab`...
DEBUG: Downloading torrent file from `https://rutracker.org/forum/viewtopic.php?t=5768151` ...
DEBUG: RuTrackerTracker: Picking a mirror ...
DEBUG: RuTrackerTracker: Probing mirror: `https://rutracker.org` ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET / HTTP/1.1" 301 162
DEBUG: https://rutracker.org:443 "GET /forum/index.php HTTP/1.1" 200 None
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/viewtopic.php?t=5768151 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/viewtopic.php?t=5768151 HTTP/1.1" 200 None
DEBUG: RuTrackerTracker: Torrent download link found: https://rutracker.org/forum/dl.php?t=5768151
DEBUG: RuTrackerTracker: Downloading torrent file from https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/dl.php?t=5768151 HTTP/1.1" 200 122154
DEBUG: Torrent was downloaded from `https://rutracker.org/forum/viewtopic.php?t=5768151`
INFO:     No updates
INFO:   Processing `Frostpunk.Game.of.The.Year.Edition.GOG-InsaneRamZes`...
DEBUG: Downloading torrent file from `https://rutracker.org/forum/viewtopic.php?t=5932207` ...
DEBUG: RuTrackerTracker: Torrent download link found: https://rutracker.org/forum/dl.php?t=5768151
DEBUG: RuTrackerTracker: Downloading torrent file from https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/dl.php?t=5768151 HTTP/1.1" 200 122154
DEBUG: Torrent was downloaded from `https://rutracker.org/forum/viewtopic.php?t=5932207`
DEBUG:     Update is available
DEBUG: TransmissionRPC: RPC method `torrent-add` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 151
INFO:     Torrent is updated
DEBUG: Unregistering `1c035226e707d6712674a9048d09c888bfbe81ee` torrent ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Saving configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: TransmissionRPC: RPC method `torrent-remove` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 56
INFO:   Processing `setup_rimworld_1.2.2723`...
DEBUG: Downloading torrent file from `https://rutracker.org/forum/viewtopic.php?t=5331180` ...
DEBUG: RuTrackerTracker: Torrent download link found: https://rutracker.org/forum/dl.php?t=5768151
DEBUG: RuTrackerTracker: Downloading torrent file from https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: RuTrackerTracker: Fetching https://rutracker.org/forum/dl.php?t=5768151 ...
DEBUG: Starting new HTTPS connection (1): rutracker.org:443
DEBUG: https://rutracker.org:443 "GET /forum/dl.php?t=5768151 HTTP/1.1" 200 122154
DEBUG: Torrent was downloaded from `https://rutracker.org/forum/viewtopic.php?t=5331180`
DEBUG:     Update is available
DEBUG: TransmissionRPC: RPC method `torrent-add` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 151
INFO:     Torrent is updated
DEBUG: Unregistering `298f99aad2c59e7020b9779ea6808d390afa2f95` torrent ...
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Saving configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: TransmissionRPC: RPC method `torrent-remove` ...
DEBUG: Starting new HTTP connection (1): 127.0.0.1:9091
DEBUG: http://127.0.0.1:9091 "POST /transmission/rpc HTTP/1.1" 200 56
DEBUG: No Notifier registered. Notification skipped
DEBUG: Loading configuration file C:\Users\Toyohara\.torrt\config.json ...
DEBUG: Saving configuration file C:\Users\Toyohara\.torrt\config.json ...
INFO: Torrent walk is finished
config.json after update
{
  "time_last_check": 1598469313,
  "walk_interval_hours": 24,
  "trackers": {
      "rutracker.org": {
          "username": "username",
          "query_string": null,
          "cookies": {
              "bb_session": "session",
              "bb_ssl": "1"
          },
          "password": "password"
      }
  },
  "rpc": {
      "transmission": {
          "url": "http://127.0.0.1:9091/transmission/rpc",
          "enabled": true,
          "host": "127.0.0.1",
          "user": null,
          "password": null,
          "port": "9091"
      }
  },
  "torrents": {
      "c0424991902bdba637dc1647d4b0a2869dbd1b21": {
          "hash": "c0424991902bdba637dc1647d4b0a2869dbd1b21",
          "name": "No Mans Sky by xatab",
          "url": "https://rutracker.org/forum/viewtopic.php?t=5331180",
          "url_file": "https://rutracker.org/forum/dl.php?t=5768151",
          "page": {
              "title": "No Man's Sky [P] [RUS + ENG + 11 / RUS + ENG + 10] (2016, VR Supported) (2.62 + 1 DLC) :: RuTracker.org",
              "cover": "",
              "date_updated": ""
          }
      }
  },
  "notifiers": {},
  "bots": {}
}
I'm using python 3.7.7 if that matters

TelegramBot object has no attribute 'allowed_users' [RUS]

Добрый день, решил попробовать новую фичу, но не получается настроить:

torrt configure_bot telegram token=12345677:SDFDFSDFSDF allowed_users=111111111

получаю ошибку:

Traceback (most recent call last):
  File "/usr/local/bin/torrt", line 10, in <module>
    sys.exit(process_commands())
  File "/usr/local/lib/python3.5/dist-packages/torrt/main.py", line 224, in process_commands
    configure_bot(args['bot_alias'], settings_dict_from_list(args['settings']))
  File "/usr/local/lib/python3.5/dist-packages/torrt/toolbox.py", line 84, in configure_bot
    return configure_entity('Bot', BotClassesRegistry, bot_alias, settings_dict)
  File "/usr/local/lib/python3.5/dist-packages/torrt/utils.py", line 93, in configure_entity
    obj.save_settings()
  File "/usr/local/lib/python3.5/dist-packages/torrt/utils.py", line 365, in save_settings
    settings[name] = getattr(self, name)
AttributeError: 'TelegramBot' object has no attribute 'allowed_users'

Python 3.5.3
torrt==0.11.1
python-telegram-bot==11.1.0

Cannot enable it in Deluge

I got deluge-server running on separate machine. Dependencies are installed, torrentool works.
I can't enable it in Deluge-gtk running on client machine.
Do i need to install dependencies required by torrt on client?

[RUS] Ошибка при обновлении торрента с rutracker в qbittorrent

Текст ошибки:

Traceback (most recent call last):
  File "/usr/local/bin/torrt", line 8, in <module>
    sys.exit(process_commands())
             ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/torrt/main.py", line 197, in process_commands
    walk(forced=args['forced'], silent=True)
  File "/usr/local/lib/python3.11/site-packages/torrt/toolbox.py", line 324, in walk
    updated = update_torrents(cfg['torrents'], remove_outdated=remove_outdated)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/torrt/toolbox.py", line 402, in update_torrents
    raw_last_updated = torrents[rpc_torrent['hash']]['page']['date_updated']
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'date_updated'

в клиенте только один торрент и только один торрент добавлен в torrt c помощью
torrt register_torrent -u https://rutracker.org/forum/viewtopic.php?t=<id> --verbose <existing hash>

в configs.json page для торрента просто пустой объект

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.