Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
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
24e802de
Commit
24e802de
authored
Mar 16, 2017
by
Mario Chirinos Colunga
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments fix
parent
4bedded4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
4 deletions
+4
-4
__init__.pyc
diarioYucatan/diarioYucatan/__init__.pyc
+0
-0
settings.pyc
diarioYucatan/diarioYucatan/settings.pyc
+0
-0
__init__.pyc
diarioYucatan/diarioYucatan/spiders/__init__.pyc
+0
-0
noticias.pyc
diarioYucatan/diarioYucatan/spiders/noticias.pyc
+0
-0
noticias.py
lajornada/lajornada/spiders/noticias.py
+4
-4
noticias.pyc
lajornada/lajornada/spiders/noticias.pyc
+0
-0
No files found.
diarioYucatan/diarioYucatan/__init__.pyc
View file @
24e802de
No preview for this file type
diarioYucatan/diarioYucatan/settings.pyc
View file @
24e802de
No preview for this file type
diarioYucatan/diarioYucatan/spiders/__init__.pyc
View file @
24e802de
No preview for this file type
diarioYucatan/diarioYucatan/spiders/noticias.pyc
View file @
24e802de
No preview for this file type
lajornada/lajornada/spiders/noticias.py
View file @
24e802de
...
...
@@ -23,8 +23,8 @@ class NoticiasItem(scrapy.Item):
class
NoticiasSpider
(
scrapy
.
Spider
):
name
=
"noticias"
def
start_requests
(
self
):
"""Lista de url a explorar."""
def
start_requests
(
self
):
"""Lista de url a explorar."""
year
=
getattr
(
self
,
'year'
,
None
)
month
=
getattr
(
self
,
'month'
,
None
)
...
...
@@ -47,7 +47,7 @@ class NoticiasSpider(scrapy.Spider):
yield
scrapy
.
Request
(
url
=
url
,
callback
=
self
.
parse
)
def
parse
(
self
,
response
):
"""parser principal."""
"""parser principal."""
item
=
NoticiasItem
()
for
noticia
in
response
.
css
(
'a.cabeza'
):
...
...
@@ -55,7 +55,7 @@ class NoticiasSpider(scrapy.Spider):
yield
scrapy
.
Request
(
url
,
callback
=
self
.
parse_dir_contents
)
def
parse_dir_contents
(
self
,
response
):
"""Parser para la pagina de cada noticia."""
"""Parser para la pagina de cada noticia."""
item
=
NoticiasItem
()
item
[
'title'
]
=
response
.
css
(
'div.cabeza::text'
)
.
extract_first
()
...
...
lajornada/lajornada/spiders/noticias.pyc
View file @
24e802de
No preview for this file type
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