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
3ec3ca57
Commit
3ec3ca57
authored
Jul 25, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shadow variable
parent
16590662
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
aitop.py
exa/exa/spiders/aitop.py
+1
-1
base.py
exa/exa/spiders/base.py
+1
-1
No files found.
exa/exa/spiders/aitop.py
View file @
3ec3ca57
...
@@ -23,7 +23,7 @@ class AitopSpider(BaseSpider):
...
@@ -23,7 +23,7 @@ class AitopSpider(BaseSpider):
url
=
'https://aitopics.org'
url
=
'https://aitopics.org'
def
tags
(
res
):
def
tags
(
res
):
concept_tags
=
res
ponse
.
xpath
(
".//div[contains(@class, 'facet_concept-tagsraw')]//div//div//ul//li"
)
concept_tags
=
res
.
xpath
(
".//div[contains(@class, 'facet_concept-tagsraw')]//div//div//ul//li"
)
for
i
in
concept_tags
:
for
i
in
concept_tags
:
if
i
.
xpath
(
".//@title"
)
.
extract_first
()
.
lower
()
==
name
.
lower
():
if
i
.
xpath
(
".//@title"
)
.
extract_first
()
.
lower
()
==
name
.
lower
():
href
=
i
.
xpath
(
".//a/@href"
)
.
extract_first
()
href
=
i
.
xpath
(
".//a/@href"
)
.
extract_first
()
...
...
exa/exa/spiders/base.py
View file @
3ec3ca57
...
@@ -10,7 +10,7 @@ class BaseSpider(scrapy.Spider):
...
@@ -10,7 +10,7 @@ class BaseSpider(scrapy.Spider):
def
__init__
(
self
,
query
=
None
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
query
=
None
,
*
args
,
**
kwargs
):
super
(
BaseSpider
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
super
(
BaseSpider
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
condition
=
query
self
.
condition
=
query
self
.
query
=
"SELECT id, name, country FROM wp_esi_entity WHERE 1 and id=
17
"
self
.
query
=
"SELECT id, name, country FROM wp_esi_entity WHERE 1 and id=
3
"
if
self
.
condition
:
if
self
.
condition
:
print
(
self
.
condition
)
print
(
self
.
condition
)
self
.
query
+=
' or {}'
.
format
(
self
.
condition
)
self
.
query
+=
' or {}'
.
format
(
self
.
condition
)
...
...
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