RuudBurger/CouchPotatoServer — Issue #73: NZBGet Downloader doesn't work if there are spaces in the nzb file name
Author: evil-dog
Created: 2012-02-26 08:48:38+00:00
State: open

I've found that the NZBGet downloader does not work if there are spaces in the nzb file name.

Below are 2 examples, one working and one not.

Not working example with spaces in the name:
03:33:06 DEBUG [hpotato.core.plugins.base] Setting cache newznab.nzb.su.tt0362478.2040
03:33:07 DEBUG [hpotato.core.plugins.base] Setting cache imdbapi.cache.tt0362478
03:33:07 INFO [e.providers.movie.imdbapi] Found: The Box (2009)
03:33:07 DEBUG [hpotato.core.plugins.base] Setting cache nzbs.tt0362478.[4]
03:33:07 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.Bluray.1080p.DTSHR5.1.x264.dxva-FraMeSToR, looking for 720P
03:33:07 DEBUG [ couchpotato.core.event] Return modified results for movie.info
03:33:08 DEBUG [tato.core.plugins.library] Adding titles: [u'The Box']
03:33:08 DEBUG [hpotato.core.plugins.base] Setting cache nzbclub."The Box" 2009 720p -german -dutch -french -danish -swedish -spanish -italian -korean -dubbed -swesub -korsub
03:33:08 INFO [hpotato.core.plugins.base] Opening url: http://www.srrdb.com/showfile.php?release=The.Box.Collector.2008.720p.BluRay.x264-SAiMORNY, params: []
03:33:11 DEBUG [hpotato.core.plugins.base] Setting cache srrdb.com the box collector 2008 720p bluray x264 saimorny
03:33:11 INFO [ato.core.plugins.searcher] Wrong: The.Box.Collector.2008.720p.BluRay.x264-SAiMORNY, undetermined naming. Looking for 'The Box (2009)'
03:33:11 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.1080p.BluRay.DTS.x264-HDC, looking for 720P
03:33:11 INFO [ato.core.plugins.searcher] "The Box 2009 720P Readnfo Bluray X264 Prism Posted By K2bug - Usenet Direct Nzb Creator - http://nzbuse.net/udnc " is too small to be 720P. 1MB instead of the minimal of 3500MB.
03:33:12 DEBUG [potato.core.plugins.movie] Changing status for Southland Tales
03:33:12 INFO [ato.core.plugins.searcher] Wrong: The.Rookie.1990.1080p.Bluray.DTS.x264-SuBoXoNe, looking for 720P
03:33:12 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.RC.LiNE.READNFO.1080p.BluRay.x264-RUBLU, looking for 720P
03:33:12 INFO [otato.core.providers.base] Found: score(135): [12500]-[#a.b.hdtv.x264@EFNet]-[The.Box.2009.RC.LiNE.READNFO.720p.BluRay.x264-RUBLU]- - "The.Box.2009.RC.LiNE.READNFO.720p.BluRay.x264-RUBLU"
03:33:13 INFO [ato.core.plugins.searcher] Wrong: The.Good.the.Bad.and.the.Ugly.1966.1080p.BluRay.DTS.x264-SuBoXoNe, looking for 720P
03:33:14 INFO [otato.core.providers.base] Found: score(135): The.Box.2009.RC.LiNE.READNFO.720p.BluRay.x264-RUBLU
03:33:14 INFO [otato.core.providers.base] Found: score(136): (????) The.Box.2009.720P.READNFO.Bluray.x264-PrisM
03:33:14 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.Bluray.1080p.DTSHR5.1.x264.dxva-FraMeSToR, looking for 720P
03:33:14 INFO [ato.core.plugins.searcher] Wrong: Just.Another.Pandoras.Box.2010.1080p.BluRay.x264-LCHD, looking for 720P
03:33:15 INFO [hpotato.core.plugins.base] Opening url: http://www.srrdb.com/showfile.php?release=Just.Another.Pandoras.Box.2010.720p.BluRay.x264-LCHD, params: []
03:33:15 DEBUG [hpotato.core.plugins.base] Setting cache srrdb.com just another pandoras box 2010 720p bluray x264 lchd
03:33:15 INFO [ato.core.plugins.searcher] Wrong: Just.Another.Pandoras.Box.2010.720p.BluRay.x264-LCHD, undetermined naming. Looking for 'The Box (2009)'
03:33:16 INFO [ato.core.plugins.searcher] Wrong: The.Final.Countdown.1980.BluRay.DTSMA.x264.dxva-SuBoXoNe, looking for 720P
03:33:16 INFO [ato.core.plugins.searcher] Wrong: The.Aviator.2004.BluRay.1080p.x264.DTSMA.dxva-SuBoXoNe, looking for 720P
03:33:16 INFO [ato.core.plugins.searcher] Wrong: The.Aviator.2004.BluRay.1080p.x264.DTSMA.dxva-SuBoXoNe, looking for 720P
03:33:16 INFO [ato.core.plugins.searcher] "HBO.Boxing.Mayweather.vs.Mosley.Main.Event.720p.HDTV.x264-WB" is too small to be 720P. 2048MB instead of the minimal of 3500MB.
03:33:16 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.1080p.BluRay.DTS.x264-HDC, looking for 720P
03:33:16 INFO [otato.core.providers.base] Found: score(132): The.Box.720p.Bluray.x264-CBGB
03:33:16 INFO [ato.core.plugins.searcher] Wrong: The.Box.2009.RC.LiNE.READNFO.1080p.BluRay.x264-RUBLU, looking for 720P
03:33:16 INFO [otato.core.providers.base] Found: score(135): The.Box.2009.RC.LiNE.READNFO.720p.BluRay.x264-RUBLU
03:33:16 INFO [hpotato.core.plugins.base] Opening url: http://www.srrdb.com/showfile.php?release=The.Boxer.2009.720p.BluRay.x264-CiNEFiLE, params: []
03:33:17 DEBUG [hpotato.core.plugins.base] Setting cache srrdb.com the boxer 2009 720p bluray x264 cinefile
03:33:17 INFO [ato.core.plugins.searcher] Wrong: The.Boxer.2009.720p.BluRay.x264-CiNEFiLE, undetermined naming. Looking for 'The Box (2009)'
03:33:17 INFO [ato.core.plugins.searcher] Wrong: Outside retention, age is 1169, needs 1000 or lower: How.The.West.Was.Won.1962.SmileBox.1080p.BluRay.DTS.x264-PerfectionHD
03:33:18 INFO [o.core.downloaders.nzbget] Sending "(????) The.Box.2009.720P.READNFO.Bluray.x264-PrisM " to NZBGet.
03:33:18 INFO [o.core.downloaders.nzbget] Successfully connected to NZBGet
03:33:18 INFO [o.core.downloaders.nzbget] Downloading: http://www.nzbclub.com/nzb_get/4222789/The Box 2009 720P READNFO Bluray x264 PrisM.nzb
03:33:18 INFO [hpotato.core.plugins.base] Opening url: http://www.nzbclub.com/nzb_get/4222789/The Box 2009 720P READNFO Bluray x264 PrisM.nzb, params: []
03:33:18 ERROR [hpotato.core.plugins.base] Failed opening url in NZBGet: http://www.nzbclub.com/nzb_get/4222789/The Box 2009 720P READNFO Bluray x264 PrisM.nzb Traceback (most recent call last):
File "/opt/couchpotato_new/couchpotato/core/plugins/base.py", line 121, in urlopen
data = urllib2.urlopen(request, timeout = timeout).read()
HTTPError: HTTP Error 400: Bad Request
03:33:18 ERROR [o.core.downloaders.nzbget] Unable to get NZB file: Traceback (most recent call last):
File "/opt/couchpotato_new/couchpotato/core/downloaders/nzbget/main.py", line 52, in download
filedata = self.urlopen(data.get('url'))
File "/opt/couchpotato_new/couchpotato/core/plugins/base.py", line 121, in urlopen
data = urllib2.urlopen(request, timeout = timeout).read()
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 435, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request
03:33:18 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:33:18 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:33:18 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:33:18 ERROR [ato.core.plugins.searcher] Tried to download, but none of the downloaders are enabled

Working example with no spaces in the file name:
03:32:25 INFO [hpotato.core.plugins.base] Opening url: http://www.imdbapi.com/?i=tt1054606&tomatoes=true, params: []
03:32:25 DEBUG [hpotato.core.plugins.base] Getting cache tmdb.cache.tt1054606
03:32:25 INFO [ato.core.plugins.searcher] Search for The Imaginarium of Doctor Parnassus in 720P
03:32:25 DEBUG [hpotato.core.plugins.base] Setting cache imdbapi.cache.tt1054606
03:32:25 INFO [e.providers.movie.imdbapi] Found: The Imaginarium of Doctor Parnassus (2009)
03:32:25 DEBUG [hpotato.core.plugins.base] Getting cache nzbs.tt1054606.[4]
03:32:25 DEBUG [hpotato.core.plugins.base] Getting cache nzbclub."The Imaginarium of Doctor Parnassus" 2009 720p -german -dutch -french -danish -swedish -spanish -italian -korean -dubbed -swesub -korsub
03:32:25 DEBUG [hpotato.core.plugins.base] Getting cache newznab.nzb.su.tt1054606.2040
03:32:25 INFO [ato.core.plugins.searcher] Wrong: [www.usenet4all.eu]-[U4ALL] The.Imaginarium.Of.Doctor.Parnassus.2009.720p.BDRip.XviD.AC3-ViSiON - "The.Imaginarium.Of.Doctor.Parnassus.2009.720p.BDRip.XviD.AC3-ViSiON" , looking for 720P
03:32:25 DEBUG [ couchpotato.core.event] Return modified results for movie.info
03:32:25 DEBUG [tato.core.plugins.library] Adding titles: [u'The Imaginarium of Doctor Parnassus']
03:32:26 INFO [hpotato.core.plugins.base] Opening url: http://www.srrdb.com/showfile.php?release=The.Imaginarium.Of.Doctor.Parnassus.720p.BluRay.x264-Grond, params: []
03:32:26 DEBUG [hpotato.core.plugins.base] Setting cache srrdb.com the imaginarium of doctor parnassus 720p bluray x264 grond
03:32:26 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.Of.Doctor.Parnassus.720p.BluRay.x264-Grond, undetermined naming. Looking for 'The Imaginarium of Doctor Parnassus (2009)'
03:32:26 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.of.Doctor.Parnassus.2009.1080p.BDRemux.DTS-MA.H264.Rus.Eng, looking for 720P
03:32:26 INFO [ato.core.plugins.searcher] "ESiR Proudly Presents: The Imaginarium of Doctor Parnassus ) "The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-ESiR.Sample" " is too small to be 720P. 106MB instead of the minimal of 3500MB.
03:32:26 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.of.Doctor.Parnassus.2009.1080p.BluRay.DTS.x264-CtrlHD, looking for 720P
03:32:26 INFO [otato.core.providers.base] Found: score(131): The.Imaginarium.Of.Doctor.Parnassus.720p.BluRay.x264-Grond
03:32:27 INFO [otato.core.providers.base] Found: score(133): ESiR Proudly Presents: The Imaginarium of Doctor Parnassus ) "The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-ESiR"
03:32:27 INFO [otato.core.providers.base] Found: score(136): The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-CtrlHD
03:32:27 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.of.Doctor.Parnassus.2009.1080p.BluRay.DTS.x264-CtrlHD, looking for 720P
03:32:27 INFO [otato.core.providers.base] Found: score(136): [13823]-[#a.b.hdtv.x264@EFNet]-[The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-CtrlHD]- "The Imaginarium of Doctor Parnassus 2009 720p BluRay DTS x264-CtrlHD"
03:32:27 INFO [otato.core.providers.base] Found: score(135): The.Imaginarium.Of.Doctor.Parnassus.2009.BluRay.720p.BluRay.x264.DTS.PRoDJi
03:32:27 INFO [otato.core.providers.base] Found: score(136): The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-CtrlHD
03:32:27 INFO [otato.core.providers.base] Found: score(131): [www.usenet4all.eu]-[FULL] The.Imaginarium.Of.Doctor.Parnassus.2009.BluRay.720p.BluRay.x264.DTS.PRoDJi - "The.Imaginarium.Of.Doctor.Parnassus.2009.BluRay.720p.BluRay.x264.DTS.PRoDJi"
03:32:27 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.Of.Doctor.Parnassus.2009.PROPER.1080p.BluRay.x264-CiNEFiLE, looking for 720P
03:32:28 INFO [otato.core.providers.base] Found: score(131): [www.usenet4all.eu]-[FULL] The.Imaginarium.Of.Doctor.Parnassus.2009.BluRay.720p.BluRay.x264.DTS.PRoDJi
03:32:28 INFO [ato.core.plugins.searcher] Wrong: [www.usenet4all.eu]-[FULL] The Imaginarium of Doctor Parnassus 2009 BRRip XvidHD 720p-NPW - "NPW" , looking for 720P
03:32:28 INFO [ato.core.plugins.searcher] Wrong: The.Imaginarium.of.Doctor.Parnassus.1080p.BluRay.x264-ALLiANCE, looking for 720P
03:32:28 INFO [ato.core.plugins.searcher] Wrong: [www.usenet4all.eu]-[FULL] The.Imaginarium.Of.Doctor.Parnassus.2009.PROPER.1080p.BluRay.x264-CiNEFiLE, looking for 720P
03:32:28 INFO [ato.core.plugins.searcher] "The.Imaginarium.Of.Doctor.Parnassus.2009.720p.LINE.XviD-ViSiON - File The.Imaginarium.Of.Doctor.Parnassus.2009.720p.LINE.XviD-ViSiON " is too small to be 720P. 790MB instead of the minimal of 3500MB.
03:32:28 INFO [otato.core.providers.base] Found: score(131): The.Imaginarium.of.Doctor.Parnassus.720p.BluRay.x264-ALLiANCE
03:32:28 INFO [ato.core.plugins.searcher] Wrong: [www.usenet4all.eu]-[FULL] The.Imaginarium.of.Doctor.Parnassus.1080p.BluRay.x264-ALLiANCE, looking for 720P
03:32:28 INFO [ato.core.plugins.searcher] "(kornet) The.Imaginarium.Of.Doctor.Parnassus.2009.720p.LINE.XviD-ViSiON "´Ù¿îÀü¿¡ ÀÐ¾îÁÖ¼¼¿ä" " is too small to be 720P. 429MB instead of the minimal of 3500MB.
03:32:28 INFO [otato.core.providers.base] Found: score(127): [www.usenet4all.eu]-[FULL] The.Imaginarium.of.Doctor.Parnassus.720p.BluRay.x264-ALLiANCE
03:32:28 INFO [o.core.downloaders.nzbget] Sending "The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-CtrlHD" to NZBGet.
03:32:28 INFO [o.core.downloaders.nzbget] Successfully connected to NZBGet
03:32:28 INFO [o.core.downloaders.nzbget] Downloading: http://nzbs.org/index.php?action=getnzb&nzbid=340046&i=57897&h=xxx
03:32:28 INFO [hpotato.core.plugins.base] Opening url: http://nzbs.org/index.php?action=getnzb&nzbid=340046&i=57897&h=xxx
03:32:35 INFO [o.core.downloaders.nzbget] NZB sent successfully to NZBGet
03:32:35 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:32:35 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:32:35 DEBUG [ couchpotato.core.event] Assume disabled eventhandler for: download
03:32:35 INFO [ato.core.plugins.searcher] Snatched "The.Imaginarium.of.Doctor.Parnassus.2009.720p.BluRay.DTS.x264-CtrlHD": The Imaginarium of Doctor Parnassus (2009) in 720P