lad1337 / XDM-main-plugin-repo

The official main Plugin Repository
19 stars 11 forks source link

Newznab get categories error #15

Open schumi2004 opened 10 years ago

schumi2004 commented 10 years ago

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 commented 10 years ago

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?

lad1337 commented 10 years ago

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 /api?t=caps&o=json of nzbMegaSearch does not offer this call it will fail

schumi2004 commented 10 years ago

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

schumi2004 commented 10 years ago

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

Saner2oo2 commented 9 years ago

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