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
849c44b1
Commit
849c44b1
authored
Jul 10, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename QueryMixin to CommonMixin
parent
784081e7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
__init__.py
exa/exa/helpers/__init__.py
+1
-1
mixins.py
exa/exa/helpers/mixins.py
+1
-1
aitop.py
exa/exa/spiders/aitop.py
+2
-2
mobihealthnews.py
exa/exa/spiders/mobihealthnews.py
+2
-2
techcrunch.py
exa/exa/spiders/techcrunch.py
+2
-2
No files found.
exa/exa/helpers/__init__.py
View file @
849c44b1
from
.company_maker
import
CompanyMaker
from
.db
import
Database
from
.mixins
import
Query
Mixin
from
.mixins
import
Common
Mixin
exa/exa/helpers/mixins.py
View file @
849c44b1
...
...
@@ -5,7 +5,7 @@ db_settings = get_project_settings().get('DB')
db
=
Database
(
**
db_settings
)
class
Query
Mixin
:
class
Common
Mixin
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
condition
=
kwargs
.
get
(
'query'
)
self
.
query
=
"SELECT id, name, country FROM wp_esi_entity WHERE 1 and id=13"
...
...
exa/exa/spiders/aitop.py
View file @
849c44b1
# -*- coding: utf-8 -*-
import
scrapy
import
dateparser
from
..helpers
import
Query
Mixin
from
..helpers
import
Common
Mixin
from
..items
import
ExaItem
class
AitopSpider
(
Query
Mixin
,
scrapy
.
Spider
):
class
AitopSpider
(
Common
Mixin
,
scrapy
.
Spider
):
name
=
"aitop"
allowed_domains
=
[
"aitopics.org"
]
...
...
exa/exa/spiders/mobihealthnews.py
View file @
849c44b1
...
...
@@ -2,11 +2,11 @@
import
dateparser
import
scrapy
import
traceback
from
..helpers
import
Query
Mixin
from
..helpers
import
Common
Mixin
from
..items
import
ExaItem
class
MobiHealthNewsSpider
(
Query
Mixin
,
scrapy
.
Spider
):
class
MobiHealthNewsSpider
(
Common
Mixin
,
scrapy
.
Spider
):
name
=
"mhn"
allowed_domains
=
[
"www.mobihealthnews.com"
]
...
...
exa/exa/spiders/techcrunch.py
View file @
849c44b1
# -*- coding: utf-8 -*-
import
scrapy
import
traceback
from
..helpers
import
Query
Mixin
from
..helpers
import
Common
Mixin
from
..items
import
ExaItem
class
TechcrunchSpider
(
Query
Mixin
,
scrapy
.
Spider
):
class
TechcrunchSpider
(
Common
Mixin
,
scrapy
.
Spider
):
name
=
"tc"
allowed_domains
=
[
"techcrunch.com"
]
...
...
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