pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.8k stars 276 forks source link

IPtorrent Url is wrong #9805

Closed JonathanVoNguyen closed 2 years ago

JonathanVoNguyen commented 3 years ago

Debug Log:

2021-08-16 22:05:59 WARNING SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] Torrent file content is empty: BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI
2021-08-16 22:05:59 DEBUG   SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] The response returned a non-200 response while requesting url https://www.iptorrents.com/t/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent Error: HTTPError('404 Client Error: Not Found for url: https://www.iptorrents.com/t/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent')
2021-08-16 22:05:59 DEBUG   SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] User-Agent: Medusa/0.5.17 (Windows; 10; ece9aff4-fefd-11eb-b91e-1c872cb68433)
2021-08-16 22:05:59 DEBUG   SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] GET URL: https://www.iptorrents.com/t/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent [Status: 404]
2021-08-16 22:05:58 INFO    SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] Downloading BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI with 46 seeders and 6 leechers and size 1.35 GB from IPTorrents, through a SearchType.MANUAL_SEARCH search
2021-08-16 22:05:58 INFO    SNATCHQUEUE-SNATCH-321285 :: [fbd43ad] Beginning to snatch release: BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI

The current URL is: https://www.iptorrents.com/t/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent

The working URL is: https://www.iptorrents.com/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent

I tried overriding the URL by using a custom URL of: https://www.iptorrents.com but that still did not work.

JonathanVoNguyen commented 3 years ago

the search uses /t/ as a part of the URL but the download does not.

p0psicles commented 3 years ago

This is weird. Just checked the code. But the /t is really only used for the search. The download URL is created from the base url.

p0psicles commented 3 years ago

So there are two possibilities here.

  1. You used a base url of www.iptorrents.com/t
  2. The search results provide a link to t/download.php/4439227/BORUTO.NARUTO.NEXT.GENERATIONS.S01E211.1080p.WEB.H264-SENPAI.torrent

I don't have access, so I can't verify this myself.

JonathanVoNguyen commented 3 years ago

I looked at the code too, the base URL is www.iptorrents.me

I updated the iptorrents.py file to use https://www.iptorrents.com which it does, but it still somehow append the /t/ part to the URL.

I also do not currently have anything set to be a custom url at the moment as well.

I can send an invite to IPtorrents for you if you'd like so you can test.

When I click download to get the file, it is the URL without the /t/ so I am not entirely sure where or how its being derived.

Also, this happens with ALL attempts at downloading something from IPTorrents, not just this specific one.

JonathanVoNguyen commented 3 years ago

I was messing around with the code a bit and I noticed that changing line 124 in iptorrents.py uses the URL I modified in that file when I do a manual search for an episode. But when going back to an episode I manually searched for already - it seemed to be referencing an older URL that was cached.

How do I go about clearing the search cache?

p0psicles commented 3 years ago

Remove cache.db and start

bardic commented 3 years ago

Sorry for the bad PR earlier. I thought I had it but it turns out that it's a cloudflare issue and the scraper being used fails the challenge. There are posts on iprtorrents, the scarper lib some similar tools with the same issue

noze2000 commented 2 years ago

i have the sae issue. was there a fix / workaround?

JonathanVoNguyen commented 2 years ago

My work around was using a mirror link. I suspect our IPs were cached in a "hit and run" ban.

https://anyname.octopus.town

https://www.iptorrents.com/forums.php?t=3005848

On Mon, Feb 7, 2022, 5:22 PM noze2000 @.***> wrote:

i have the sae issue. was there a fix / workaround?

— Reply to this email directly, view it on GitHub https://github.com/pymedusa/Medusa/issues/9805#issuecomment-1031995274, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUJW4YLEKYZ5EI3LMQYVDDU2BA2HANCNFSM5CI3UWJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

noze2000 commented 2 years ago

medusa finds the torrent. Then tries to download with the /t in the link - which fails. This is rather new in my setup.

I don't know how to make it stop:) The mirror solution didnt work unfortunately - same result..

JonathanVoNguyen commented 2 years ago

Try this one: https://ipt.findnemo.net

What ended up happening was that I would update the URL but it would get cached. I deleted the cache db and then rebooted the service which fixed the issue.

On Tue, Feb 8, 2022 at 3:25 PM noze2000 @.***> wrote:

medusa finds the torrent. The tries to download with the /t in the link - which fails. This is rather new in my setup.

I don't know how to make it stop:) The mirror solution didnt work unfortunately - same result..

— Reply to this email directly, view it on GitHub https://github.com/pymedusa/Medusa/issues/9805#issuecomment-1033029941, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUJW4YHRH5XYCQDHGSKO5LU2F35FANCNFSM5CI3UWJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

medariox commented 2 years ago

Provider works fine in latest version.