Repository: pymedusa/Medusa

Issue:
IPT Provider error
Hello, it has been like a month since I am having this problem.
Medusa is unable to use IPTorrents to search and download, it always worked perfect until one day. I have double check the cookie values and they are an exact match.
Anyone can help me? here's the log with the error

2021-02-09 16:18:43 INFO	FORCEDSEARCHQUEUE-MANUAL-364928 :: [2ab9d45] Unable to find manual results for: Snowpiercer - S02E02 - Smolder to Life
2021-02-09 16:18:43 INFO	FORCEDSEARCHQUEUE-MANUAL-364928 :: IPTorrents :: [2ab9d45] Performing season pack search for Snowpiercer
2021-02-09 16:18:43 WARNING	FORCEDSEARCHQUEUE-MANUAL-364928 :: IPTorrents :: [2ab9d45] Please configure the required cookies for this provider. Check your provider settings
2021-02-09 16:18:43 INFO	FORCEDSEARCHQUEUE-MANUAL-364928 :: IPTorrents :: [2ab9d45] Unknown exception in url https://iptorrents.eu Error: Cloudflare IUAM possibility malformed, issue extracing delay value.
2021-02-09 16:18:43 INFO	FORCEDSEARCHQUEUE-MANUAL-364928 :: IPTorrents :: [2ab9d45] Performing episode search for Snowpiercer

Could it be because it's using iptorrents.eu instead of iptorrents.com?


Discussion:
>> Could it be because it's using iptorrents.eu instead of iptorrents.com?

Yes, there seems to be a problem with the iptorrents.eu domain being blocked (maybe from just certain subnets...OVH Kimsufi seems to be a problem recently).  IPT provides several alternate DNS names (you can find them on their internal forums) and some of them work to bypass this filtering.  You could resolve this (probably temporarily...until the next update depending on your installation method) by editing

/app/medusa/medusa/providers/torrent/html/iptorrents.py

to change the line :

`        self.url = 'https://iptorrents.eu' `                         

replacing "iptorrents.eu" with one of the alternate URL's.

I think it would be a nice feature to expose a simple text box on the "Provider Options" page for the IPTorrents search provider that would override self.url if that text box was populated.  That would allow those alternate DNS names to be used by members without needing to include them in the code.


> 
> 
> > > Could it be because it's using iptorrents.eu instead of iptorrents.com?
> 
> Yes, there seems to be a problem with the iptorrents.eu domain being blocked (maybe from just certain subnets...OVH Kimsufi seems to be a problem recently). IPT provides several alternate DNS names (you can find them on their internal forums) and some of them work to bypass this filtering. You could resolve this (probably temporarily...until the next update depending on your installation method) by editing
> 
> /app/medusa/medusa/providers/torrent/html/iptorrents.py
> 
> to change the line :
> 
> ` self.url = 'https://iptorrents.eu'`
> 
> replacing "iptorrents.eu" with one of the alternate URL's.
> 
> I think it would be a nice feature to expose a simple text box on the "Provider Options" page for the IPTorrents search provider that would override self.url if that text box was populated. That would allow those alternate DNS names to be used by members without needing to include them in the code.

Thanks that works... I changed it to iptorrents.com and now it's working perfectly 


Resolving patch:
diff --git a/medusa/providers/torrent/html/iptorrents.py b/medusa/providers/torrent/html/iptorrents.py
--- a/medusa/providers/torrent/html/iptorrents.py
+++ b/medusa/providers/torrent/html/iptorrents.py
@@ -42,6 +42,7 @@ def __init__(self):
         self.cookies = ''
         self.required_cookies = ('uid', 'pass')
         self.categories = '73=&60='
+        self.custom_url = None
 
         # Cache
         self.cache = tv.Cache(self)


Test patch: