Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
esi-data-scrapping
esi-table-data
Commits
0793811f
Commit
0793811f
authored
Jun 12, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug in making request
parent
ed9259da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
mobihealthnews.py
exa/exa/spiders/mobihealthnews.py
+4
-2
techcrunch.py
exa/exa/spiders/techcrunch.py
+4
-1
No files found.
exa/exa/spiders/mobihealthnews.py
View file @
0793811f
...
...
@@ -28,8 +28,10 @@ class MobiHealthNewsSpider(scrapy.Spider):
companies
=
CompanyMaker
(
self
.
comp
)
companies
.
make_companies
(
self
.
name
)
for
i
in
companies
.
get_companies
():
yield
scrapy
.
Request
(
i
.
url
,
callback
=
self
.
parse
,
meta
=
{
'company'
:
i
,
'post_id'
:
0
})
try
:
yield
scrapy
.
Request
(
i
.
url
+
'/'
,
callback
=
self
.
parse
,
meta
=
{
'company'
:
i
,
'post_id'
:
0
})
except
:
pass
def
parse
(
self
,
response
):
try
:
...
...
exa/exa/spiders/techcrunch.py
View file @
0793811f
...
...
@@ -28,7 +28,10 @@ class TechcrunchSpider(scrapy.Spider):
companies
=
CompanyMaker
(
self
.
comp
)
companies
.
make_companies
(
self
.
name
)
for
i
in
companies
.
get_companies
():
yield
scrapy
.
Request
(
i
.
url
+
'/'
,
callback
=
self
.
parse
,
meta
=
{
'company'
:
i
,
'post_id'
:
0
})
try
:
yield
scrapy
.
Request
(
i
.
url
+
'/'
,
callback
=
self
.
parse
,
meta
=
{
'company'
:
i
,
'post_id'
:
0
})
except
:
pass
def
parse
(
self
,
response
):
if
'tag'
in
response
.
url
:
...
...
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