Hi,
I am working on modifying popcornarsonist's autodownload script to fit my needs. Mainly, use nzbs.org instead of newzbin since I dont have an account there and do not want to pay to search. I can't get the api to add the download url's. Using a link from tvnzb works fine but not nzbs. Im thinking it has to do with the &'s or something. Putting the url into the web interface works fine. I tried using quotes and that didnt help. Anyone got any ideas?
works: http://192.168.7.144:7777/sabnzbd/api?m ... /nzb/15101
doesnt work:
http://192.168.7.144:7777/sabnzbd/api?m ... &h=REMOVED
Thanks a lot!
~xxhds
Help with api addurl
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Help with api addurl
Last edited by switch on November 23rd, 2008, 12:39 am, edited 1 time in total.
Re: Help with api addurl
The url needs to be properly encoded since it contains &'s and other characters.
Try:
May be a bit overboard, you can try just replacing
& with %3D
and ? with %3F
Try:
Code: Select all
http://192.168.7.144:7777/sabnzbd/api?mode=addurl&name=http%3A//www.nzbs.org/index.php%3Faction%3Dgetnzbnzbid%3D136254%26i%3D0000%26h%3D00000000000
& with %3D
and ? with %3F
Re: Help with api addurl
Thanks alot. That did the trick
msgid=re.sub("\?", "%3F", msgid)
msgid=re.sub("=", "%3D", msgid)
msgid=re.sub("&", "%26", msgid)
msgid=re.sub("\?", "%3F", msgid)
msgid=re.sub("=", "%3D", msgid)
msgid=re.sub("&", "%26", msgid)
Re: Help with api addurl
yep, either that or just:
msgid = urlllib.quote(msgid)
msgid = urlllib.quote(msgid)