Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
searx
Commits
a8a0f838
Commit
a8a0f838
authored
Sep 23, 2019
by
Mudada
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
ssh://gitlab.iscpif.fr:20021/gargantext/crawlers/searx
into dev
parents
f1e873f0
5a31d1a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
README.md
README.md
+36
-4
No files found.
README.md
View file @
a8a0f838
#
searx
#
SEARX Crawler
[
searx
](
https://en.wikipedia.org/wiki/Searx
)
is a privacy-respecting, hackable metasearch engine.
## Base website
https://searx.me/
## Based on
https://gitlab.iscpif.fr/smurail/gargantext-light/blob/simon-gargantext-light/gargantext/scrapers/searx.py
## Main function to get main results through metadata
## Usage
### Entry function
The basic entry point of this crawler is the function
`SEARX.`
`getMetadataWith`
.
getMetadataWith "artificial intelligence" (Just 10)
This function take a
`Text`
representing the query you want to run on searx
and a
`Int`
representing the maximum number of pages you want to get.
### Return Type
The return type is pretty simple, it's
**either**
a
`ClientError`
or a
`ISTEX.`
`Client.Documents`
.
`Documents`
represent a collection of
`ISTEX.`
`Client.Document`
and the number of
`Document`
returned.
`Document`
is a simple type that contain nearly every informations we need (id,title,abstract,publicationDate,sources).
**authors**
is not present since it's not contained in the searx database.
### Exemple
Here is a basic main using the entry point of the crawler and printing the 5 first results.
```
hs
{-# LANGUAGE OverloadedStrings #-}
module
Main
where
import
SEARX
main
::
IO
()
main
=
do
res
<-
getMetadataWith
"ia"
300
case
res
of
(
Left
err
)
->
print
err
(
Right
r
)
->
print
$
take
5
$
_documents_hits
r
```
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