diff --git a/src/pipelines/StatsWriter.py b/src/pipelines/StatsWriter.py index da2042e549ff7ce174a39cb02794d172881496d5..2cc540d8986b9471f4c82fe357c72d173d590c0f 100644 --- a/src/pipelines/StatsWriter.py +++ b/src/pipelines/StatsWriter.py @@ -5,6 +5,6 @@ class StatsWriter(object): def close_spider(self, spider): stats = spider.crawler.stats.get_stats() - with open('../statistics.txt', 'w') as f: + with open('/statistics.txt', 'w') as f: for k, v in stats.items(): f.writelines('{}: {}\n'.format(k, v)) diff --git a/src/settings.py b/src/settings.py index 782dd67d2a5c6645fe778c2abfa1466cc6a6de10..10af87fa9aa7e509558762600acb1ed11a3c4423 100644 --- a/src/settings.py +++ b/src/settings.py @@ -68,7 +68,7 @@ ROBOTSTXT_OBEY = True # Configure item pipelines # See https://doc.scrapy.org/en/latest/topics/item-pipeline.html -IMAGES_STORE = '../image' +IMAGES_STORE = './image' ITEM_PIPELINES = { 'pipelines.DatabaseWriter.DatabaseWriter': 101, 'pipelines.StatsMailer.StatsMailer': 999,