Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
crawlersNoticias
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
m3
crawlersNoticias
Commits
54164b6d
Commit
54164b6d
authored
Jan 29, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crawlers
parent
d715b956
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
items.pyc
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/items.pyc
+0
-0
pipelines.py
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/pipelines.py
+3
-3
pipelines.pyc
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/pipelines.pyc
+0
-0
noticias.py
...por_dia/miPuntoDeVista/miPuntoDeVista/spiders/noticias.py
+1
-1
No files found.
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/items.pyc
0 → 100644
View file @
54164b6d
File added
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/pipelines.py
View file @
54164b6d
...
...
@@ -11,6 +11,9 @@ from collections import OrderedDict
class
JsonWriterPipeline
(
object
):
def
__init__
(
self
,
filename
):
self
.
filename
=
filename
@
classmethod
def
from_crawler
(
cls
,
crawler
):
# Here you get whatever value was passed through the "filename" command line parameter
...
...
@@ -20,9 +23,6 @@ class JsonWriterPipeline(object):
# Instantiate the pipeline with the file name
return
cls
(
filename
)
def
__init__
(
self
,
filename
):
self
.
filename
=
filename
def
open_spider
(
self
,
spider
):
self
.
counter
=
0
self
.
file
=
open
(
self
.
filename
,
'w'
)
...
...
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/pipelines.pyc
0 → 100644
View file @
54164b6d
File added
descarga_por_dia/miPuntoDeVista/miPuntoDeVista/spiders/noticias.py
View file @
54164b6d
...
...
@@ -2,7 +2,7 @@ import scrapy, re
"""
USO:
scrapy crawl noticias -
t json -
-nolog -s filename=2018-03-22.json -a year=2017 -a month=3 -a day=22
scrapy crawl noticias --nolog -s filename=2018-03-22.json -a year=2017 -a month=3 -a day=22
"""
TAG_RE
=
re
.
compile
(
r'<[^>]+>'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment