Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shubhamdutta2000/containerized-scrapping-with-selenium-fastapi

Building and Running a Docker Container and Scrapping data using Selenium and with Fast API
https://github.com/shubhamdutta2000/containerized-scrapping-with-selenium-fastapi

containers continuous-integration docker fastapi pipenv python scrapping selenium

Last synced: 3 months ago
JSON representation

Building and Running a Docker Container and Scrapping data using Selenium and with Fast API

Awesome Lists containing this project

README

        

# Containerized-Scrapping-with-Selenium-FastAPI

Building and Running a Docker Container and Scrapping data using Selenium and with Fast API

The main goal of this repository is to deploy a Docker container with both, FastAPI and Selenium, to check the possibilities when we try to use FastAPI to receive parameters, and run a selenium process in the background to gather and parse data.
This example uses Selenium to make google search and scrap the links

## Build Setup

```
# Clone repo and cd into directory
git clone https://github.com/Shubhamdutta2000/Containerized-Scrapping-with-Selenium-FastAPI.git
cd Containerized-Scrapping-with-Selenium-FastAPI
```

```
# Install dependencies locally
pip install pipenv
pipenv shell
pipenv install
```

# How to Start

```
uvicorn main:app --reload
```

# Start with Docker Locally

```
# Docker build
docker build Containerized-Scrapping-with-Selenium-FastAPI

# Docker Run
docker run -d -p 8000:8000 Containerized-Scrapping-with-Selenium-FastAPI

OR

# Docker compose
docker-compose up --build

```

## Details

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### License

Released under the [MIT License](LICENSE).

---