[GH-ISSUE #111] rutor and unionpeer support #77

Closed
opened 2026-10-13 19:47:06 +00:00 by bsakaguchi · 40 comments
Owner

Originally created by @andrewt82 on GitHub (Jul 14, 2016).
Original GitHub issue: https://github.com/werwolfby/monitorrent/issues/111

i install latest build monitorrent from https://github.com/werwolfby/monitorrent/releases/download/1.0.1/monitorrent-1.0.1.zip

go into web interface and can't see this trackers:
www.rutor.org
www.unionpeer.org

trackers

what could be the problem?

Originally created by @andrewt82 on GitHub (Jul 14, 2016). Original GitHub issue: https://github.com/werwolfby/monitorrent/issues/111 i install latest build monitorrent from https://github.com/werwolfby/monitorrent/releases/download/1.0.1/monitorrent-1.0.1.zip go into web interface and can't see this trackers: www.rutor.org www.unionpeer.org ![trackers](https://cloud.githubusercontent.com/assets/15378087/16837807/de05fdfe-49c5-11e6-9258-9cc64337b09c.png) what could be the problem?
bsakaguchi 2026-10-13 19:47:06 +00:00
  • closed this issue
  • added the
    wontfix
    label
Author
Owner

@DSilence commented on GitHub (Jul 14, 2016):

Since those plugins do not require authentication, we didn't add dedicated settings pages for them. They will work without additional configuration.

<!-- gh-comment-id:232642132 --> @DSilence commented on GitHub (Jul 14, 2016): Since those plugins do not require authentication, we didn't add dedicated settings pages for them. They will work without additional configuration.
Author
Owner

@andrewt82 commented on GitHub (Jul 14, 2016):

ok thank's now i understand!

<!-- gh-comment-id:232645386 --> @andrewt82 commented on GitHub (Jul 14, 2016): ok thank's now i understand!
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

Why when i add rutor url (http://rutor.info/torrent/501106/) nothing happens?
Strip runs but add button becomes active :(

2016-07-16 12 08 13
In the console there are no errors.
in what could be the problem here?

<!-- gh-comment-id:233121304 --> @andrewt82 commented on GitHub (Jul 16, 2016): Why when i add rutor url (http://rutor.info/torrent/501106/) nothing happens? Strip runs but add button becomes active :( ![2016-07-16 12 08 13](https://cloud.githubusercontent.com/assets/15378087/16893876/07df2cac-4b4e-11e6-92f4-60cc73363ee6.png) In the console there are no errors. in what could be the problem here?
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

Most likely - rutor.info is inaccessible by your device. Try pinging it.

<!-- gh-comment-id:233121420 --> @DSilence commented on GitHub (Jul 16, 2016): Most likely - rutor.info is inaccessible by your device. Try pinging it.
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

ping work
2016-07-16 12 11 24

<!-- gh-comment-id:233121529 --> @andrewt82 commented on GitHub (Jul 16, 2016): ping work ![2016-07-16 12 11 24](https://cloud.githubusercontent.com/assets/15378087/16893903/a5ae866c-4b4e-11e6-9de6-49d8cf41f53a.png)
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

What version of python are you running? (python --version)

<!-- gh-comment-id:233121631 --> @DSilence commented on GitHub (Jul 16, 2016): What version of python are you running? (python --version)
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

Python 2.7.9

<!-- gh-comment-id:233121669 --> @andrewt82 commented on GitHub (Jul 16, 2016): Python 2.7.9
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

I think this happens because of Rostelecom locks
it would be good proxy to work Rutor

<!-- gh-comment-id:233121717 --> @andrewt82 commented on GitHub (Jul 16, 2016): I think this happens because of Rostelecom locks it would be good proxy to work Rutor
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

Could be. We've discussed possible solutions to ISP locks like build-in proxy support or customizable mirrors. Meanwhile, could you try it with proxy? Thanks for investigating btw.

<!-- gh-comment-id:233121946 --> @DSilence commented on GitHub (Jul 16, 2016): Could be. We've discussed possible solutions to ISP locks like build-in proxy support or customizable mirrors. Meanwhile, could you try it with proxy? Thanks for investigating btw.
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

I can check with the proxy, just do not know where in the code to enter the proxy server

<!-- gh-comment-id:233122060 --> @andrewt82 commented on GitHub (Jul 16, 2016): I can check with the proxy, just do not know where in the code to enter the proxy server
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

We're using requests package. To add proxy to rutor, find the plugin file (/monitorrent/plugins/trackers/rutor.py) and find all places where http request is being sent (there are 2 of them).
Then add proxy url to each request as specified here:
http://docs.python-requests.org/en/master/user/advanced/#proxies

<!-- gh-comment-id:233122564 --> @DSilence commented on GitHub (Jul 16, 2016): We're using requests package. To add proxy to rutor, find the plugin file (/monitorrent/plugins/trackers/rutor.py) and find all places where http request is being sent (there are 2 of them). Then add proxy url to each request as specified here: http://docs.python-requests.org/en/master/user/advanced/#proxies
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

it's too hard for me, I'm still in Python does not understand so much to do it :(

I understand that it is necessary to add to the file (rutor.py) after importing the top

proxies = {
'http': 'http://login:passwrd@ip:port/'
}

and
change line in function def parse_url on this:
r = requests.get(url, proxies=proxies, allow_redirects=False, timeout=self.tracker_settings.requests_timeout)

change line in function def get_hash on this:
r = requests.get(download_url, proxies=proxies, allow_redirects=False, timeout=self.tracker_settings.requests_timeout)
?

<!-- gh-comment-id:233123444 --> @andrewt82 commented on GitHub (Jul 16, 2016): it's too hard for me, I'm still in Python does not understand so much to do it :( I understand that it is necessary to add to the file (rutor.py) after importing the top proxies = { 'http': 'http://login:passwrd@ip:port/' } and change line in function def parse_url on this: r = requests.get(url, proxies=proxies, allow_redirects=False, timeout=self.tracker_settings.requests_timeout) change line in function def get_hash on this: r = requests.get(download_url, proxies=proxies, allow_redirects=False, timeout=self.tracker_settings.requests_timeout) ?
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

If it's possible, you could send me the proxy info, and I'll update it for you. Or, I could just send you the modified file and you will just change the proxy ip and port.

<!-- gh-comment-id:233123496 --> @DSilence commented on GitHub (Jul 16, 2016): If it's possible, you could send me the proxy info, and I'll update it for you. Or, I could just send you the modified file and you will just change the proxy ip and port.
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

please send modified file and i change the proxy ip and port ant check it

<!-- gh-comment-id:233123558 --> @andrewt82 commented on GitHub (Jul 16, 2016): please send modified file and i change the proxy ip and port ant check it
Author
Owner

@DSilence commented on GitHub (Jul 16, 2016):

Uploaded zip with updated file. At the top is the list of proxies. No need to change https, just modify the http one.
rutor.zip

<!-- gh-comment-id:233123733 --> @DSilence commented on GitHub (Jul 16, 2016): Uploaded zip with updated file. At the top is the list of proxies. No need to change https, just modify the http one. [rutor.zip](https://github.com/werwolfby/monitorrent/files/367205/rutor.zip)
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

ok thank's, but when i try run python server.py i get error:

root@Server:/ffp/var/monitorrent-1.0.1# python server.py
Traceback (most recent call last):
  File "server.py", line 170, in <module>
    main()
  File "server.py", line 134, in main
    load_plugins()
  File "/mnt/HD/HD_a2/ffp/var/monitorrent-1.0.1/monitorrent/plugin_managers.py", line 21, in load_plugins
    __import__(module_name)
  File "/mnt/HD/HD_a2/ffp/var/monitorrent-1.0.1/monitorrent/plugins/trackers/_rutor.py", line 20, in <module>
    class RutorOrgTopic(Topic):
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/api.py", line 55, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative
    _MapperConfig.setup_mapping(cls, classname, dict_)
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping
    cfg_cls(cls_, classname, dict_)
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 131, in __init__
    self._setup_table()
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 395, in _setup_table
    **table_kw)
  File "/ffp/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 422, in __new__
    "existing Table object." % key)
sqlalchemy.exc.InvalidRequestError: Table 'rutororg_topics' is already defined for this MetaData instance.  Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
<!-- gh-comment-id:233140660 --> @andrewt82 commented on GitHub (Jul 16, 2016): ok thank's, but when i try run python server.py i get error: ``` root@Server:/ffp/var/monitorrent-1.0.1# python server.py Traceback (most recent call last): File "server.py", line 170, in <module> main() File "server.py", line 134, in main load_plugins() File "/mnt/HD/HD_a2/ffp/var/monitorrent-1.0.1/monitorrent/plugin_managers.py", line 21, in load_plugins __import__(module_name) File "/mnt/HD/HD_a2/ffp/var/monitorrent-1.0.1/monitorrent/plugins/trackers/_rutor.py", line 20, in <module> class RutorOrgTopic(Topic): File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/api.py", line 55, in __init__ _as_declarative(cls, classname, cls.__dict__) File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative _MapperConfig.setup_mapping(cls, classname, dict_) File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping cfg_cls(cls_, classname, dict_) File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 131, in __init__ self._setup_table() File "/ffp/lib/python2.7/site-packages/sqlalchemy/ext/declarative/base.py", line 395, in _setup_table **table_kw) File "/ffp/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 422, in __new__ "existing Table object." % key) sqlalchemy.exc.InvalidRequestError: Table 'rutororg_topics' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object. ```
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

Looks like you have two files of rutor plugin.
One _rutor.py and rutor.py?

<!-- gh-comment-id:233140731 --> @werwolfby commented on GitHub (Jul 16, 2016): Looks like you have two files of rutor plugin. One _rutor.py and rutor.py?
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

you'l right!
i am just rename original rutor.py in rutor.py :) my error plugins with .py extension automaticly loads, i rename original file to rutor.py and now all ok, rutor.info work perfect via proxy!
thank's for you help!

<!-- gh-comment-id:233141089 --> @andrewt82 commented on GitHub (Jul 16, 2016): you'l right! i am just rename original rutor.py in _rutor.py :) my error plugins with .py extension automaticly loads, i rename original file to rutor.py_ and now all ok, rutor.info work perfect via proxy! thank's for you help!
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

You are welcome, and thank you for investigation.

<!-- gh-comment-id:233141146 --> @werwolfby commented on GitHub (Jul 16, 2016): You are welcome, and thank you for investigation.
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

strangely, when I perform the Execute rutor.info i get error
2016-07-16 20 27 44
and this
2016-07-16 20 28 02

<!-- gh-comment-id:233141524 --> @andrewt82 commented on GitHub (Jul 16, 2016): strangely, when I perform the Execute rutor.info i get error ![2016-07-16 20 27 44](https://cloud.githubusercontent.com/assets/15378087/16896145/2130bf7c-4b94-11e6-88f3-f255e9b98253.png) and this ![2016-07-16 20 28 02](https://cloud.githubusercontent.com/assets/15378087/16896155/5c5b5774-4b94-11e6-8eeb-12553b8c57f3.png)
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

Could you please click on particular report for additional details?

<!-- gh-comment-id:233141574 --> @werwolfby commented on GitHub (Jul 16, 2016): Could you please click on particular report for additional details?
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

i attach additional details in post upward

<!-- gh-comment-id:233146527 --> @andrewt82 commented on GitHub (Jul 16, 2016): i attach additional details in post upward
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

Do you have any logs in std output?

<!-- gh-comment-id:233146613 --> @werwolfby commented on GitHub (Jul 16, 2016): Do you have any logs in std output?
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

in std output no errors

<!-- gh-comment-id:233146705 --> @andrewt82 commented on GitHub (Jul 16, 2016): in std output no errors
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

Yep, I've checked there shouldn't be any output.
According to code, the Error status can be in case if the status code of downloaded file hasn't status 200.
Could you please try download it manually?

<!-- gh-comment-id:233146789 --> @werwolfby commented on GitHub (Jul 16, 2016): Yep, I've checked there shouldn't be any output. According to code, the Error status can be in case if the status code of downloaded file hasn't status 200. Could you please try download it manually?
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

And thx for news that Mr. Robot started 👍
Will wait when Monitorrent download it automatically from lostfilm.tv

<!-- gh-comment-id:233146835 --> @werwolfby commented on GitHub (Jul 16, 2016): And thx for news that Mr. Robot started :+1: Will wait when **Monitorrent** download it automatically from **lostfilm.tv**
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

manually downloading ok, this trouble with any torrents on rutor :(
Mr. Robot - good movie, I'm also waiting for translation from lostfilm.tv ;)

<!-- gh-comment-id:233147271 --> @andrewt82 commented on GitHub (Jul 16, 2016): manually downloading ok, this trouble with any torrents on rutor :( Mr. Robot - good movie, I'm also waiting for translation from lostfilm.tv ;)
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

We need more logging, will do this, not in nearest release, but soon.
For now we can try to insert output in rutor plugin, let me update rutor plugin for you.

<!-- gh-comment-id:233147391 --> @werwolfby commented on GitHub (Jul 16, 2016): We need more logging, will do this, not in nearest release, but soon. For now we can try to insert output in rutor plugin, let me update rutor plugin for you.
Author
Owner

@andrewt82 commented on GitHub (Jul 16, 2016):

ok, thank's!
I have noticed when edit rutor and unionpeer torrents no choice of series and seasons like lostfilm.tv
2016-07-16 22 42 28
this is normal?

<!-- gh-comment-id:233147575 --> @andrewt82 commented on GitHub (Jul 16, 2016): ok, thank's! I have noticed when edit rutor and unionpeer torrents no choice of series and seasons like lostfilm.tv ![2016-07-16 22 42 28](https://cloud.githubusercontent.com/assets/15378087/16896799/de7d8b7a-4ba6-11e6-89ba-0ca464c8b72d.png) this is normal?
Author
Owner

@werwolfby commented on GitHub (Jul 16, 2016):

Yes, this is ok, because we download whole torrent, and not update info what download, and what not.
For lostfilm.tv we can select which torrent we should download

Try use this rutor.zip plugin, and send output.

<!-- gh-comment-id:233147979 --> @werwolfby commented on GitHub (Jul 16, 2016): Yes, this is ok, because we download whole torrent, and not update info what download, and what not. For lostfilm.tv we can select which torrent we should download Try use this [rutor.zip](https://github.com/werwolfby/monitorrent/files/367496/rutor.zip) plugin, and send output.
Author
Owner

@andrewt82 commented on GitHub (Jul 18, 2016):

i get this error:

301
{'Date': 'Mon, 18 Jul 2016 18:21:53 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Location': 'http://ru-tor.net/download/513492'}

what could be the problem?

<!-- gh-comment-id:233414359 --> @andrewt82 commented on GitHub (Jul 18, 2016): i get this error: ``` 301 {'Date': 'Mon, 18 Jul 2016 18:21:53 GMT', 'Content-Length': '0', 'Connection': 'keep-alive', 'Location': 'http://ru-tor.net/download/513492'} ``` what could be the problem?
Author
Owner

@andrewt82 commented on GitHub (Jul 18, 2016):

i change in function


    def get_download_url(self, url):
        if not self.can_parse_url(url):
            return None
        parsed_url = urlparse(url)
        match = self._regex.match(parsed_url.path)
        if match is None:
            return None

        return "http://d.rutor.info/download/" + match.group(1)

row 155 with this url:
return "http://ru-tor.net/download/" + match.group(1)

and all everything was ok :)

apparently they changed the URL from which downloaded the torrent file

<!-- gh-comment-id:233415610 --> @andrewt82 commented on GitHub (Jul 18, 2016): i change in function ``` def get_download_url(self, url): if not self.can_parse_url(url): return None parsed_url = urlparse(url) match = self._regex.match(parsed_url.path) if match is None: return None return "http://d.rutor.info/download/" + match.group(1) ``` row 155 with this url: `return "http://ru-tor.net/download/" + match.group(1)` and all everything was ok :) apparently they changed the URL from which downloaded the torrent file
Author
Owner

@werwolfby commented on GitHub (Jul 18, 2016):

Got it, i think I know what to do with this issue :)

<!-- gh-comment-id:233415910 --> @werwolfby commented on GitHub (Jul 18, 2016): Got it, i think I know what to do with this issue :)
Author
Owner

@werwolfby commented on GitHub (Jul 18, 2016):

I want to know, why it is not redirecting me by http://d.rutor.info/download/513492
Looks like strange behavior of Russian Federation blocking system

<!-- gh-comment-id:233417285 --> @werwolfby commented on GitHub (Jul 18, 2016): I want to know, why it is not redirecting me by http://d.rutor.info/download/513492 Looks like strange behavior of Russian Federation blocking system
Author
Owner

@andrewt82 commented on GitHub (Jul 18, 2016):

My Rostelecom is very bad Provider...
I think that it is necessary setup TOR or VPN on my NAS ))), in browser i use Economy Traffic on Google Chrome.

thank's I also put download s4 Ray Donavan :))

<!-- gh-comment-id:233419189 --> @andrewt82 commented on GitHub (Jul 18, 2016): My Rostelecom is very bad Provider... I think that it is necessary setup TOR or VPN on my NAS ))), in browser i use Economy Traffic on Google Chrome. thank's I also put download s4 Ray Donavan :))
Author
Owner

@werwolfby commented on GitHub (Jul 18, 2016):

Could you please revert your changes, and update rutor.py:
Replace in this code (line 195) False on True:

    def _prepare_request(self, topic):
        return self.tracker.get_download_url(topic.url), {'allow_redirects': False}

And I try to investigate why I disabled redirects for rutor, this should solve your issues as well.

<!-- gh-comment-id:233420452 --> @werwolfby commented on GitHub (Jul 18, 2016): Could you please revert your changes, and update rutor.py: Replace in this code (line 195) `False` on `True`: ``` def _prepare_request(self, topic): return self.tracker.get_download_url(topic.url), {'allow_redirects': False} ``` And I try to investigate why I disabled redirects for rutor, this should solve your issues as well.
Author
Owner

@andrewt82 commented on GitHub (Jul 18, 2016):

ok i revert url and enable redirects on def _prepare_request
and in this functions

def parse_url
...
r = requests.get(url, allow_redirects=True,

and in this

def get_hash
...
r = requests.get(download_url, allow_redirects=True,

without redirects in this functions torrents also don't add in monitortorrent :(

<!-- gh-comment-id:233423071 --> @andrewt82 commented on GitHub (Jul 18, 2016): ok i revert url and enable redirects on def _prepare_request and in this functions ``` def parse_url ... r = requests.get(url, allow_redirects=True, ``` and in this ``` def get_hash ... r = requests.get(download_url, allow_redirects=True, ``` without redirects in this functions torrents also don't add in monitortorrent :(
Author
Owner

@werwolfby commented on GitHub (Jul 18, 2016):

Yep, make sense, we will update working with mirrors, to simplify this process.

<!-- gh-comment-id:233423600 --> @werwolfby commented on GitHub (Jul 18, 2016): Yep, make sense, we will update working with mirrors, to simplify this process.
Author
Owner

@andrewt82 commented on GitHub (Jul 18, 2016):

ok thank's you VERY MUCH for you help and this cool programm!

<!-- gh-comment-id:233423912 --> @andrewt82 commented on GitHub (Jul 18, 2016): ok thank's you VERY MUCH for you help and this cool programm!
Author
Owner

@werwolfby commented on GitHub (Jul 18, 2016):

You are welcome, and thx for issues investigation

<!-- gh-comment-id:233426109 --> @werwolfby commented on GitHub (Jul 18, 2016): You are welcome, and thx for issues investigation
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
werwolfby/monitorrent#77
No description provided.