Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
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
humanities
gargantext
Commits
e7af713d
Commit
e7af713d
authored
Apr 06, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] adding scrapers, maybe to add inside the API.
parent
15296ea7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
urls.py
gargantext/urls.py
+2
-2
urls.py
gargantext/views/api/urls.py
+0
-4
MedlineFetcher.py
scrapers/MedlineFetcher.py
+0
-0
pubmed.py
scrapers/pubmed.py
+2
-2
urls.py
scrapers/urls.py
+16
-0
No files found.
gargantext/urls.py
View file @
e7af713d
...
...
@@ -26,7 +26,7 @@ from annotations.views import main as annotations_main_view
from
graphExplorer.rest
import
Graph
from
graphExplorer.views
import
explorer
from
scrap
pers
import
urls
as
scrap
pers_urls
from
scrap
ers
import
urls
as
scra
pers_urls
urlpatterns
=
[
url
(
r'^admin/'
,
admin
.
site
.
urls
)
,
url
(
r'^generated/'
,
include
(
gargantext
.
views
.
generated
.
urls
))
...
...
@@ -45,5 +45,5 @@ urlpatterns = [ url(r'^admin/', admin.site.urls)
,
url
(
r'^projects/(\d+)/corpora/(\d+)/node_link.json$'
,
Graph
.
as_view
())
#url(r'^projects/(\d+)/corpora/(\d+)/explorer$', include(graphExplorer.urls))
#url(r'^projects/(\d+)/corpora/(\d+)/explorer$', include(graphExplorer_urls))
,
url
(
r'^scrap
pers/'
,
include
(
scrap
pers_urls
))
,
url
(
r'^scrap
ers/'
,
include
(
scra
pers_urls
))
]
gargantext/views/api/urls.py
View file @
e7af713d
...
...
@@ -2,7 +2,6 @@ from django.conf.urls import url
from
.
import
nodes
from
.
import
ngramlists
from
.
import
scraping
urlpatterns
=
[
url
(
r'^nodes$'
,
nodes
.
NodeListResource
.
as_view
())
,
url
(
r'^nodes/(\d+)$'
,
nodes
.
NodeResource
.
as_view
()
)
...
...
@@ -22,7 +21,4 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
# aka lexical model
#, url(r'^scraping$' , scraping.Target.as_view() )
# Scraping : getting data from external database
# Available databases : Pubmed, IsTex, (next: CERN)
]
scrap
p
ers/MedlineFetcher.py
→
scrapers/MedlineFetcher.py
View file @
e7af713d
File moved
scrap
p
ers/pubmed.py
→
scrapers/pubmed.py
View file @
e7af713d
from
scrap
p
ers.MedlineFetcher
import
MedlineFetcher
from
scrapers.MedlineFetcher
import
MedlineFetcher
# from datetime import datetime
...
...
@@ -24,7 +24,7 @@ from gargantext.util.toolchain import parse_extract_indexhyperdata
# pour lire la section [scrap
p
ers] de gargantext.ini
# pour lire la section [scrapers] de gargantext.ini
#from configparser import ConfigParser
# --------------------------------------------------------------------
...
...
scrap
p
ers/urls.py
→
scrapers/urls.py
View file @
e7af713d
from
django.conf.urls
import
url
import
scrappers.pubmed
as
pubmed
import
scrapers.pubmed
as
pubmed
#import scrapers.istex as istex
#import scrapers.cern as cern
#import scrapers.hal as hal
# /!\ urls patterns here are *without* the trailing slash
# Scraping : getting data from external database
# Available databases : Pubmed, IsTex, (next: CERN)
# /!\ urls patterns here are *without* the trailing slash
urlpatterns
=
[
url
(
r'^pubmed/query$'
,
pubmed
.
getGlobalStats
)
#, url(r'^scraping$' , scraping.Target.as_view() )
,
]
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