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
9d75ff01
Commit
9d75ff01
authored
May 22, 2017
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] BUG if query is more than authorized max.
parent
239d52e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
ISIDORE.py
gargantext/util/crawlers/ISIDORE.py
+3
-5
project.html
templates/pages/projects/project.html
+1
-1
No files found.
gargantext/util/crawlers/ISIDORE.py
View file @
9d75ff01
...
...
@@ -33,7 +33,7 @@ class IsidoreCrawler(Crawler):
return
(
bool2sparql
(
query
,
count
=
count
,
offset
=
offset
,
limit
=
limit
))
def
_get
(
self
,
query
,
offset
=
0
,
limit
=
100
,
lang
=
None
):
def
_get
(
self
,
query
,
offset
=
0
,
limit
=
None
,
lang
=
None
):
'''Parameters to download data'''
isidore
(
query
,
count
=
False
,
offset
=
offset
,
limit
=
limit
)
...
...
@@ -53,9 +53,9 @@ class IsidoreCrawler(Crawler):
self
.
status
.
append
(
"fetching results"
)
corpus
=
[]
limit
=
100
limit
=
100
0
self
.
query_max
=
self
.
scan_results
(
query
)
#
print("self.query_max : %s" % self.query_max)
print
(
"self.query_max :
%
s"
%
self
.
query_max
)
if
self
.
query_max
>
QUERY_SIZE_N_MAX
:
msg
=
"Invalid sample size N =
%
i (max =
%
i)"
%
(
self
.
query_max
...
...
@@ -64,11 +64,9 @@ class IsidoreCrawler(Crawler):
print
(
"WARNING (scrap: ISIDORE d/l ): "
,
msg
)
self
.
query_max
=
QUERY_SIZE_N_MAX
#for page in range(1, trunc(self.query_max / 100) + 2):
for
offset
in
range
(
0
,
self
.
query_max
,
limit
):
print
(
"Downloading result
%
s to
%
s"
%
(
offset
,
self
.
query_max
))
#for doc in self._get(query, count=False, offset=offset, limit=limit) :
for
doc
in
isidore
(
query
,
offset
=
offset
,
limit
=
limit
)
:
corpus
.
append
(
doc
)
...
...
templates/pages/projects/project.html
View file @
9d75ff01
...
...
@@ -804,7 +804,7 @@
$
(
'#submit_thing'
).
prop
(
'disabled'
,
false
);
$
(
"#submit_thing"
).
html
(
"Processing a sample file"
)
$
(
"#submit_thing"
).
on
(
"click"
,
function
(){
save
ALL
(
pubmedquery
,
N
,
"/moissonneurs/isidore/save/"
);
save
(
pubmedquery
,
N
,
"/moissonneurs/isidore/save/"
);
//$("#submit_thing").onclick()
})}
}
...
...
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