pillone / usntssearch

NZB Metasearch engine
pillone.github.io/usntssearch
265 stars 79 forks source link

Not able to add nzb through API #166

Closed Undeadhunter closed 8 years ago

Undeadhunter commented 8 years ago

Issue seems to be the API call sends out a redirect while CP and others expect a NZB file

Trying to fix the issue on https://github.com/Mirabis/usntssearch/tree/couchpotato-fix

However my Python knowledge is pretty much 0, so I've been messing about with it.

Issue seems to be around beam_localwarp in WarperModule.py it sends out a redirect, so the fix would be to get the file from the provider, and then send it back as a correct nzb file.

However not sure how to do it

Mirabis commented 8 years ago

Does it work with warper disabled? Haven't checked yet

Undeadhunter commented 8 years ago

Nope. Warper seems to ignore options in settings as well, it warps stuff anyway also in the normal search if you disable it the api still warps it. Which is an issue all together, check main page template, it checks for the value of enc url but then ignores it lol...

That isn't the issue however. It's the way cp expects to get the nzb file. Megasearch sends cp a redirect request to the website of the newznab you configure, but cp doesn't follow that link. Thus it just downloads the redirect html file.

Easiest option is to download the file, and send it to cp through http.

But I need to read up on python requests for that, I have general coding knowledge but nothing specific to python.

On Sun, Nov 15, 2015, 15:03 Moreno Sint Hill notifications@github.com wrote:

Does it work with warper disabled? Haven't checked yet

— Reply to this email directly or view it on GitHub https://github.com/pillone/usntssearch/issues/166#issuecomment-156813785 .

Undeadhunter commented 8 years ago

Issue resolved, made pull request in @Mirabis his fork