Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScrapyTutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Gusev
ScrapyTutorial
Commits
c1b6bed8
Commit
c1b6bed8
authored
5 years ago
by
Anton Gusev
Browse files
Options
Downloads
Patches
Plain Diff
change directory for writing stats, images
parent
bffb3431
No related branches found
No related tags found
2 merge requests
!5
Develop
,
!4
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pipelines/StatsWriter.py
+1
-1
1 addition, 1 deletion
src/pipelines/StatsWriter.py
src/settings.py
+1
-1
1 addition, 1 deletion
src/settings.py
with
2 additions
and
2 deletions
src/pipelines/StatsWriter.py
+
1
−
1
View file @
c1b6bed8
...
...
@@ -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
))
This diff is collapsed.
Click to expand it.
src/settings.py
+
1
−
1
View file @
c1b6bed8
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment