Commit ef2e6b4a authored by Mael NICOLAS's avatar Mael NICOLAS

Update README.md

parent 07d1892d
# searx
# SEARC Crawler
[searx](https://en.wikipedia.org/wiki/Searx) is a privacy-respecting, hackable metasearch engine.
## Base website
https://searx.me/
## Based on
## Main function to get main results through metadata
getMetadataWith "artificial intelligence" (Just 10)
## Usage
### Entry function
The basic entry point of this crawler is the function `SEARX.` `getMetadataWith`.
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 r
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment