https://github.com/sanix-darker/selenium-fetch-api
A simple Flask Rest-Api for a Selenium scrapping !
https://github.com/sanix-darker/selenium-fetch-api
Last synced: 7 months ago
JSON representation
A simple Flask Rest-Api for a Selenium scrapping !
- Host: GitHub
- URL: https://github.com/sanix-darker/selenium-fetch-api
- Owner: Sanix-Darker
- Created: 2020-06-02T23:32:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T20:11:36.000Z (over 4 years ago)
- Last Synced: 2025-01-29T23:28:07.369Z (8 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Selenium-fetch-api
This is a basic Flask Rest-Api for a selenium scrapping !
## Requirements
- python (3.x is recommended)## How to install
- Create your virtual environment
```
virtualenv -p python3 venv
source venv/bin/activate
```- You need to install all requirements :
```shell-script
pip install -r requirements.txt
```- Rename the `example.config.txt` to `config.txt` file and change parameters.
- Install geckodriver :
```shell-script
# For linux users# cd /home/your-user-name
wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
# Unzip the file
tar -xvzf geckodriver*
chmod +x geckodriver
# Add it in the directory specify on your config.txt file as GECKO_PATH# For other OS's users, please check releases on https://github.com/mozilla/geckodriver/releases
```
Put the geckodriver binary file in the root of this directory## How to launch
To start the selenium fetch-API, you just have to run :
```
sh ./start.sh
# or just
python -m app.main
```
You can found the HTTP-DOCUMENTATIOn here : [CLICK ME](https://documenter.getpostman.com/view/2696027/SztG46Bv?version=latest)## How to test
To perform tests for this application, you just have to run :
```
sh ./tests.sh# The content :
# -----------------
# Copy the config txt file to tests directory
cp ./config.txt ./tests/
pytest# Then you delete it again
rm -rf ./tests/config.txt
```## Author
- Sanix-darker