XDM-main-plugin-repo icon indicating copy to clipboard operation
XDM-main-plugin-repo copied to clipboard

Newznab get categories error

Open schumi2004 opened this issue 11 years ago • 5 comments

If i follow the logging correctly i should set verify_ssl_certificate to ON but in both cases (OFF and ON) i'm getting errors and no categories. This is tested on a nzbMegaSearch instance running locally.

DEBUG 2014-02-15 13:24:06.968553
function _gatherCategories needs host DEBUG 2014-02-15 13:24:06.981650
function _gatherCategories needs port DEBUG 2014-02-15 13:24:06.994283
function _gatherCategories needs verify_ssl_certificate DEBUG 2014-02-15 13:24:07.005902
Field 'field_verify_ssl_certificate' not found in kwargs. tring array DEBUG 2014-02-15 13:24:07.018159
calling > with [u'localhost', 9999, True] ERROR 2014-02-15 13:24:07.066973
Error during _gatherCategories of Newznab(Default) Error: No JSON object could be decoded

Traceback (most recent call last): File "/volume1/@appstore/xdm/share/XDM/xdm/web/ajax.py", line 73, in pluginCall status, data, msg = p_function(_fn_args) File "/usr/local/xdm/var/plugins/Indexer/Newznab-de_lad1337_newznab-0_7/Newznab.py", line 142, in _gatherCategories for cat in r.json()['categories']['category']: File "/volume1/@appstore/xdm/share/XDM/site-packages/requests/models.py", line 629, in json return json.loads(self.text or self.content, *_kwargs) File "/usr/local/python/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/local/python/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/python/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Traceback: Traceback (most recent call last): File "/volume1/@appstore/xdm/share/XDM/xdm/web/ajax.py", line 73, in pluginCall status, data, msg = p_function(_fn_args) File "/usr/local/xdm/var/plugins/Indexer/Newznab-de_lad1337_newznab-0_7/Newznab.py", line 142, in _gatherCategories for cat in r.json()['categories']['category']: File "/volume1/@appstore/xdm/share/XDM/site-packages/requests/models.py", line 629, in json return json.loads(self.text or self.content, *_kwargs) File "/usr/local/python/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/local/python/lib/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/python/lib/python2.7/json/decoder.py", line 383, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

schumi2004 avatar Feb 15 '14 12:02 schumi2004

When adding 1 entry listed in nzbMegaSearch fetching categories works perfect so i'm not sure if this is a bug? nzbMegaSearch functions as a newznab site though. Edit: Added a second entry/site from nzbmegasearch list and it failed on it also. Currently i have 1 working newznab site working with fetching categories.

Edit: Is it possible to use multiple categories in 1 Newznab (Default) instance? For example 2000,3000 for TV Shows?

schumi2004 avatar Feb 15 '14 12:02 schumi2004

No JSON object could be decoded

means the server does not give us JSON data in the request body ... ssl verifications would have been earlier

i dont know if the how close the "nzbMegaSearch" implements the nezwnab api ... i expect JSON not xml

to get the categories the newznab plugin calls <server_url>/api?t=caps&o=json of nzbMegaSearch does not offer this call it will fail

lad1337 avatar Feb 15 '14 12:02 lad1337

Ow that's tricky if Newznab site doesn support json. And looks like nzbmegasearch doesn provide JSON also . https://github.com/pillone/usntssearch

schumi2004 avatar Feb 15 '14 12:02 schumi2004

Maybe a good idea to implement xml reading also since most providers (at least here) don't support JSON

schumi2004 avatar Feb 15 '14 23:02 schumi2004

Did you ever get anywhere with this ?

I am having the same issue, I have tried with local installs of newznab and nzedb, and a couple of remote sites and I cant get it to work.

I am guessing its something local (given the range of sites) but I cant see a dependencies list

Saner2oo2 avatar Dec 15 '14 07:12 Saner2oo2