diff --git a/README.md b/README.md index af4edc9..0c4a33e 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,38 @@ -# duckduckgo_search_api +# Duckduckgo_search_api Deploy an API that pulls data from duckduckgo search engine. + +## Usage +### 1) Simple (pull from hub.docker.com) +```python3 +docker run -p 8000:8000 deedy5/duckduckgo_search_api +``` +**check**
+[http://127.0.0.1:8000/](http://127.0.0.1:8000/)
+[http://127.0.0.1:8000/text?q=test&max_results=5](http://127.0.0.1:8000/text?q=test&max_results=5) + ___ -## 1) Usage -**clone** +### 2) Advanced (build yourself) +clone ```python3 git clone https://github.com/deedy5/duckduckgo_search_api.git cd duckduckgo_search_api ``` -**add PROXY and set TIMEOUT in main.py** (*example with [iproyal residential proxies](https://iproyal.com?r=residential_proxies)*) +add PROXY and set TIMEOUT in main.py (*example with [iproyal residential proxies](https://iproyal.com?r=residential_proxies)*) ```python3 -... TIMEOUT = 20 PROXY = "socks5://user:password@geo.iproyal.com:32325" -... ``` -**run** +create venv and install requirements ```python3 -python -m pip install -U -r requirements.txt -python start.py +python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt ``` - -**check**
-[http://127.0.0.1:8000/](http://127.0.0.1:8000/)
-[http://127.0.0.1:8000/ddg?q=test](http://127.0.0.1:8000/ddg?q=test) - -___ -## 2) Docker-compose -**run** +build and run using `docker-compose` ```python3 docker-compose up --build ``` -___ -## 3) Docker +build and run using `docker` ```python3 -# build docker build -t ddgs . -# run docker run -d --name ddgs -p 8000:8000 --dns 1.1.1.1 --dns 8.8.8.8 ddgs -``` -___ -## 4) Test -```python3 -python -m pytest -``` +``` \ No newline at end of file