Page 2 of 3

Re: 0.7.1 nzbsrus rss issue

Posted: July 10th, 2012, 2:53 pm
by exussum
shypike wrote: As for the redirection. The Python libs do that automatically and I'd have to use
lower level ones to avoid it.
Couldnt you use URLopener instead of FancyURLopener ? or does something depend on the Fancy ?

Re: 0.7.1 nzbsrus rss issue

Posted: July 10th, 2012, 3:32 pm
by shypike
Yes, I can use URLopener, but then I get just INVALID_CREDENTIALS when it's an invalid report number.
Not very helpful.
Also, I do not get the VIP message.
So for now I'll stick to the simplest fix and change it later when you have your API ready.

Re: 0.7.1 nzbsrus rss issue

Posted: July 10th, 2012, 3:47 pm
by Battle_707
Heh...I was just joking.

Anyway, I realize that things are quicker to be fixed on my side. If you want to contact me directly if you have any issues with our site or would like to know if we can make things easier for you, that would be great with me. I've always thought it was odd that there is no open channel of communication between us.

The API is actually online already, I just need to write the documentation on it so that any programmer can pick up on how to properly use it. I hope to be done writing it up by the end of the day or tomorrow, but if you want to jump on it and read the document as we are writing it, I can send you a link. Things might actually be changing a bit in the beginning seeing how I've personally never written an API and people might have feature requests (exussum asked for a 'push', which I don't quite conceptually understand how that's linked to the API).

I am not very fluent in python myself, but I was just suggesting it as loading and parsing/ searching through a complete DOM seems like a waste of resources to me. I can adjust error codes if it will give more clarity.

Re: 0.7.1 nzbsrus rss issue

Posted: July 10th, 2012, 3:54 pm
by shypike
You can always copy someone else's API.
Why invent your own? More work for you and more work for me.
Both newzbin2.es and nzbmatrix have decent APIs.

Re: 0.7.1 nzbsrus rss issue

Posted: July 10th, 2012, 4:01 pm
by Battle_707
I'm usually not a bit fan of copying other's work. On top of that, our database structure is quite distinct, meaning that I will have to update the code severely anyway. Regardless, the current API code is actually really lightweight, as it plugs in into the core scripts I wrote to streamline database readouts.

Re: 0.7.1 nzbsrus rss issue

Posted: July 11th, 2012, 9:24 pm
by drizzt09
now what file do we find line 346 to edit to: ldata = data[:500].lower()

Re: 0.7.1 nzbsrus rss issue

Posted: July 12th, 2012, 1:49 am
by shypike
sabnzbd/urlgrabber.py
nzbsrus.com have a patched version available for download.

Re: 0.7.1 nzbsrus rss issue

Posted: July 12th, 2012, 2:03 am
by exussum
its 64 bit only atm though. - ill make a 32 bit version tonight

Re: 0.7.1 nzbsrus rss issue

Posted: July 12th, 2012, 10:07 pm
by drizzt09
I dont have urlgrabber.py
I have urlgrabber.pyo in C:\Program Files\SABnzbd\lib\sabnzbd.zip\SABnzbd\
and I am unable to edit with notepadd++

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 12:36 am
by exussum
drizzt09 wrote:I dont have urlgrabber.py
I have urlgrabber.pyo in C:\Program Files\SABnzbd\lib\sabnzbd.zip\SABnzbd\
and I am unable to edit with notepadd++

As far as im aware you have to compile the change, pyo is a py object (compiled) file - i changed the fine in the zip folderbut had a fair amount of problems actually running it after that. Was better to recompile

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 12:44 am
by sander
exussum wrote:
drizzt09 wrote:I dont have urlgrabber.py
I have urlgrabber.pyo in C:\Program Files\SABnzbd\lib\sabnzbd.zip\SABnzbd\
and I am unable to edit with notepadd++

As far as im aware you have to compile the change, pyo is a py object (compiled) file - i changed the fine in the zip folderbut had a fair amount of problems actually running it after that. Was better to recompile
Only the SABnzbd source, like on your Ubuntu, has the source files *.py (and *.pyo). On Windows (and OSX?), SABnzbd is packaged/compiled, and only has *.pyo

So I think that on Windows, running SABnzbd.exe, you cannot change the source yourself.

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 12:50 am
by exussum
sander wrote:
exussum wrote:
drizzt09 wrote:I dont have urlgrabber.py
I have urlgrabber.pyo in C:\Program Files\SABnzbd\lib\sabnzbd.zip\SABnzbd\
and I am unable to edit with notepadd++

As far as im aware you have to compile the change, pyo is a py object (compiled) file - i changed the fine in the zip folderbut had a fair amount of problems actually running it after that. Was better to recompile
Only the SABnzbd source, like on your Ubuntu, has the source files *.py (and *.pyo). On Windows (and OSX?), SABnzbd is packaged/compiled, and only has *.pyo

So I think that on Windows, running SABnzbd.exe, you cannot change the source yourself.
When its compiled it all goes to a library zip file, But i think theres some sort of control there ? Replacing the file (either by hex editing the pyo or by recompiling and replacing doesnt seem to work

I dont think 0.7.2 is far away now though anyway

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 1:03 am
by drizzt09
yes I would love 0.7.2 as I am now without a functioning SAB for 3 days now.
Ill even beta test. Im used to beta testing, my job requires me beta testing smartphones and smartphone software

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 6:58 am
by drizzt09
so im still getting "Trying to fetch NZB from http://www.nzbsrus.com/nzbdownload_rss. ... 67709eb7b/" with SABnzbd Version: 0.7.2RC1

2012-07-13 07:56:23,394::INFO::[urlgrabber:117] Grabbing URL http://www.nzbsrus.com/nzbdownload_rss. ... 67709eb7b/

2012-07-13 07:56:23,707::INFO::[misc:783] Creating directories: D:\-= working =-\nzb

2012-07-13 07:56:23,707::WARNING::[nzbstuff:702] Empty NZB file nzb [http://www.nzbsrus.com/nzbdownload_rss. ... 67709eb7b/]

2012-07-13 07:56:23,707::INFO::[urlgrabber:209] Unknown error fetching NZB, retry after 2 min http://www.nzbsrus.com/nzbdownload_rss. ... 67709eb7b/

2012-07-13 07:56:27,144::DEBUG::[interface:400] API-call from 192.168.2.10 {'output': 'json', 'apikey': 'fcaa6fb5778848daa2ba00379a1998dd', 'limit': '5', 'mode': 'queue'}

Re: 0.7.1 nzbsrus rss issue

Posted: July 13th, 2012, 7:24 am
by shypike
What happens if you paste the nzbrus URL into your browser?