I believe this started after I updated Nzbdrone yesterday, but now it’s not able to parse any releases from my NzbMegaSearch API:
[Info] NzbSearchService: Searching 3 indexers for [Fargo : S01E10]
[Warn] FetchFeedService: NzbMegaSearch http://omitted:8050/api?t=tvsearch&cat=5030,5040&extended=1&apikey=omitted&limit=100&rid=35276&season=1&ep=10 Indexer responded with html content. Site is likely blocked or unavailable.
[Info] FetchFeedService: Finished searching NzbMegaSearch for [Fargo : S01E10]. Found 0
[Info] DownloadDecisionMaker: No reports found
I can load that exact link in my browser, and it appears to be a valid XML RSS page.
Megasearch is returning the content type as HTML instead of text/xml or another proper RSS format. If you use the dev tools of your browser you should be able to check the response headers, specifically what the Content-Type header is set to.
The change on drone’s end is to deal with issues when the provider returns HTML instead of XML content and prevents drone from attempting to parse something that will fail, unfortunately megasearch has a few issues and this adds another to the list.
@Statia I believe its the response header thats the issue, not definitely not the content of the XML itself. We made these changes in drone for better error handling as its required in some cases. Since drone has no way to determine whether or not its connecting to a newznab indexer or megasearch we can’t handle this on our end without reverting our intentional change. I’m not familiar with Megasearch, so I can’t say whether or not this can easily be solved in their code.
Can someone confirm what the response header is set to?
@markus101, what would be the lift in reverting the intentional change in favor of triggering based on detecting the text content versus the HTTP headers? This would avoid issues with any other indexers that do a bad job of sending the correct headers, but the content is valid.
@Taloth Yeah I raised an issue with NzbMegaSearch on GitHub, but there’s little by way of activity from the original developer so I don’t know if it will ever get looked into.
@markus101 Would it be better to check if the response headers OR the content contain the correct type rather than just the headers? I know in an ideal world, all API’s should return the correct type header, but it’s rarely an ideal world.
@Statia, yes I figured I just added it as reference.
Late last night I took a quick look in the metasearch python code, looks to me like you need a grand total of 3 lines to fix it. But it was already like 2 am so didn’t feel like actually installing it to test it out.
Aside from the content type issue, I also ran into an issue where only the first result was being scraped out of the XML file. After doing a bit of searching I found that NzbDrone recently changed to using the GUID field in the results to identify releases. To fix this, I changed the following line in ApiModule.py: