I want to use a Feed Exporter to send items to S3 storage. I can get
this working locally but when running through scrapyd, the settings
are overridden by the new item storage feature in scrapy 0.15. (I'm
using the latest dev version). My settings are:
FEED_URI = 's3://MYBUCKET/feeds/%(name)s/%(time)s.jl'
FEED_FORMAT = 'jsonlines'
FEED_STORE_EMPTY = True
I've tried putting
ITEMS_DIR =
in the file scrapyd settings file in /etc/scrapyd/conf.d/000-default
per
http://doc.scrapy.org/en/latest/topics/scrapyd.html#items-dir but
I then just get an a mkdir permission denied error in scrapyd.log and
the spider doesn't run (tb at end).
Is there a way to either have my S3 exporting as an additional feed or
to have it instead of the default scrapyd feed?
I'd be grateful for any help that can be offered.
2012-05-05 09:41:56+0100 [-] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/scrapyd/poller.py", line 24, in
poll
returnValue(self.dq.put(self._message(msg, p)))
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py",
line 1128, in put
self.waiting.pop(0).callback(obj)
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py",
line 280, in callback
self._startRunCallbacks(result)
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py",
line 354, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py",
line 371, in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "/usr/lib/pymodules/python2.6/scrapyd/launcher.py", line 43,
in _spawn_process
env = e.get_environment(msg, slot)
File "/usr/lib/pymodules/python2.6/scrapyd/environ.py", line 32, in
get_environment
env['SCRAPY_FEED_URI'] = self._get_file(message, self.items_dir,
'jl')
File "/usr/lib/pymodules/python2.6/scrapyd/environ.py", line 39, in
_get_file
os.makedirs(logsdir)
File "/usr/lib/python2.6/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
exceptions.OSError: [Errno 13] Permission denied: 'myproject'