swannie-eire / prowlarr-qbittorrent-plugin

Prowlarr Plugin for Qbittorrent
24 stars 3 forks source link

Can't proceed with torrent download #2

Closed mBaratta96 closed 1 year ago

mBaratta96 commented 1 year ago

Hello, and thank you for such a nice plugin.

I tried to use the plugin to work with a Docker instance of Prowlarr by setting the API key and URL as described in the documentation. The plugin manages to retrieve all the links provided by Prowlarr correctly. However, when I click on a link to proceed with the torrent download, nothing happens. I never get the download menu.

qBittorrent version is 4.5.1

Thanks.

swannie-eire commented 1 year ago

I won't be able to help much here as I don't use prowlarr any more as I think jackett has more features.

Some suggestions Try coping the link and entered it manually into qbit. Have you check the qbit torrent logs Try copying the link and try to download the torrent from a browser?

mBaratta96 commented 1 year ago

I've made a bit of tests.

Following qBittorrent debug instructions, I run some scripts from the .local/share/qBittorrent/nova3 folder.

First, I tried to perform a search:

python3 ./nova2.py prowlarr all decision

This works, I get different results. Among them:

http://0.0.0.0:9696/1/download?apikey=63b25395375a4a2dbf4c3b8e8b73adce&link=RkdLWnBGVHlrYysrTmRYalNwYnk3SDRnU3Byd0dHaXFuK3V0RnFSYjNEeHJDR0I4ZFR2VzlQVmxQRjRVT2RvMVh0YWppNTRTRFRrWHpQeTl1eWZmOG9ndXdlUCtNd0pkbTBQSlpBdGRLbnAyMDhJTjRZU2dMSlE4MDBsb1B3ZUkwR1o2NWlIQ3JUM1lCOWYxKzdUd25JeUpVcWZ2eGpWZGZxQi9uTzA3aFU0PQ&file=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264|Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264 [1337x]|1299227648|1|3|http://0.0.0.0:9696|https://1337x.unblockninja.com/torrent/5270974/Felipe-Esparza-Bad-Decisions-2020-1080p-WEBRip-x264/

So, this is what happen if I try to run the download script:

python3 nova2dl.py http://0.0.0.0:9696 "http://0.0.0.0:9696/1/download?apikey=63b25395375a4a2dbf4c3b8e8b73adce&link=R3o2V1htLytLOTRlRmpoN2J4U25GZ1V5NGlLaE8vWTFkOTJlRW1XOER1U2oxTENnYVEweE15V2ZzSVpkRHl4LzdpTGlMZWNrekdhZGV6UnJmYStmQTlhWGFFWU80ZzhpMlluZ2VpL1JIV0F0UUZvbWFHZ1RHTEtYYW55K2xaZng5MnV3MEVHNFh0TTg5aE96REhRYitFWXYvVktpS1dPZ25xRXB1S2dlYjFrPQ&file=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264"

I get the following Python error

Traceback (most recent call last):
  File "/home/marco/.local/share/qBittorrent/nova3/nova2dl.py", line 60, in <module>
    engine.download_torrent(download_param)
  File "/home/marco/.local/share/qBittorrent/nova3/engines/prowlarr.py", line 77, in download_torrent
    print(download_file(download_url))
  File "/home/marco/.local/share/qBittorrent/nova3/helpers.py", line 109, in download_file
    response = urllib.request.urlopen(req)
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 708, in http_error_302
    raise HTTPError(
urllib.error.HTTPError: HTTP Error 301: Moved Permanently - Redirection to url 'magnet:?xt=urn:btih:02C962C2C40DE7CE958F487AF295E0CF6D856A84&dn=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2890%2Fannounce&tr=udp%3A%2F%2F9.rarbg.to%3A2850%2Fannounce&tr=udp%3A%2F%2Ftracker.slowcheetah.org%3A14760%2Fannounce&tr=udp%3A%2F%2Ftracker.fatkhoala.org%3A13720%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce' is not allowed

Maybe using a different library then urllib? Like request?

swannie-eire commented 1 year ago

I've made a bit of tests.

Following qBittorrent debug instructions, I run some scripts from the .local/share/qBittorrent/nova3 folder.

First, I tried to perform a search:

python3 ./nova2.py prowlarr all decision

This works, I get different results. Among them:

http://0.0.0.0:9696/1/download?apikey=63b25395375a4a2dbf4c3b8e8b73adce&link=RkdLWnBGVHlrYysrTmRYalNwYnk3SDRnU3Byd0dHaXFuK3V0RnFSYjNEeHJDR0I4ZFR2VzlQVmxQRjRVT2RvMVh0YWppNTRTRFRrWHpQeTl1eWZmOG9ndXdlUCtNd0pkbTBQSlpBdGRLbnAyMDhJTjRZU2dMSlE4MDBsb1B3ZUkwR1o2NWlIQ3JUM1lCOWYxKzdUd25JeUpVcWZ2eGpWZGZxQi9uTzA3aFU0PQ&file=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264|Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264 [1337x]|1299227648|1|3|http://0.0.0.0:9696|https://1337x.unblockninja.com/torrent/5270974/Felipe-Esparza-Bad-Decisions-2020-1080p-WEBRip-x264/

So, this is what happen if I try to run the download script:

python3 nova2dl.py http://0.0.0.0:9696 "http://0.0.0.0:9696/1/download?apikey=63b25395375a4a2dbf4c3b8e8b73adce&link=R3o2V1htLytLOTRlRmpoN2J4U25GZ1V5NGlLaE8vWTFkOTJlRW1XOER1U2oxTENnYVEweE15V2ZzSVpkRHl4LzdpTGlMZWNrekdhZGV6UnJmYStmQTlhWGFFWU80ZzhpMlluZ2VpL1JIV0F0UUZvbWFHZ1RHTEtYYW55K2xaZng5MnV3MEVHNFh0TTg5aE96REhRYitFWXYvVktpS1dPZ25xRXB1S2dlYjFrPQ&file=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264"

I get the following Python error

Traceback (most recent call last):
  File "/home/marco/.local/share/qBittorrent/nova3/nova2dl.py", line 60, in <module>
    engine.download_torrent(download_param)
  File "/home/marco/.local/share/qBittorrent/nova3/engines/prowlarr.py", line 77, in download_torrent
    print(download_file(download_url))
  File "/home/marco/.local/share/qBittorrent/nova3/helpers.py", line 109, in download_file
    response = urllib.request.urlopen(req)
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 708, in http_error_302
    raise HTTPError(
urllib.error.HTTPError: HTTP Error 301: Moved Permanently - Redirection to url 'magnet:?xt=urn:btih:02C962C2C40DE7CE958F487AF295E0CF6D856A84&dn=Felipe.Esparza.Bad.Decisions.2020.1080p.WEBRip.x264&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2890%2Fannounce&tr=udp%3A%2F%2F9.rarbg.to%3A2850%2Fannounce&tr=udp%3A%2F%2Ftracker.slowcheetah.org%3A14760%2Fannounce&tr=udp%3A%2F%2Ftracker.fatkhoala.org%3A13720%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce' is not allowed

Maybe using a different library then urllib? Like request?

Have your tired with multiple different torrent downloads? Try private tracker if you can. It shows HTTP error in the logs you provided. The magnet link you provided works for me when i add it to qbit torrent 4.3.8 so something else could be going on here as it a public tracker it could be blocked by your ISP or something.

I just tested in Qbit 4.3.8 and prowlarr version 0.1.1.978 and the plugin was working as expected.

swannie-eire commented 1 year ago

Closing as unable to dupe.

seascape commented 5 months ago

New Prowlarr use. Same problem here.

Neither "Open download window" or "Download" do anything -- nothing even appears in the execution log. "Open description page" works as expected, though. "Copy -> Download Link" works but does not provide a useful torrent URL, instead giving a local network Prowlarr URL (by design, no doubt, but not useful as a workaround here).

Anyway, I'm mostly fine using Prowlarr directly. Just a +1 that there does seem to be some issue here.

swannie-eire commented 5 months ago

New Prowlarr use. Same problem here.

Neither "Open download window" or "Download" do anything -- nothing even appears in the execution log. "Open description page" works as expected, though. "Copy -> Download Link" works but does not provide a useful torrent URL, instead giving a local network Prowlarr URL (by design, no doubt, but not useful as a workaround here).

Anyway, I'm mostly fine using Prowlarr directly. Just a +1 that there does seem to be some issue here.

Thank you for your comment as stated in the repo.

THIS REPO IS NO LONGER MAINTAINED. For a supported plugin please use Jackett.

The qbittorrent Jackett plugin is actually supported by the jackett dev team plus jackett is a far better supported platform.