This project finds the combinations of items with their total amount present in a particular restaurant. This is useful for finding the best combinations of food items that will get the best discount possible.
It takes MagicPin Restaurant URL, Total Amt for which the combinations are needed to be calculated.
It can also take the Percentage off and Upto values and calculates the best deal possible.
It does it by using a formula:
EX: Total Amt = 100*100/94 = 106
This is only applicable for Food Delivery.
pip install -r requirements.txt
Flask
pip install flask
Scrapy
pip install scrapy
Playwright
pip install playwright
Gunicorn
pip install gunicorn
- Install all the requirements
- Run
playwright install
- Run
playwright install-deps
(if this doesn't work)- Change the browser from webkit to chromium inside scrapper2.py this line
- browser = p.chromium.launch()
- Run
python3 server2.py
(Development Mode) - The server will be listening at
http://localhost:8000
gunicorn -b 0.0.0.0:8000 wsgi:app
- Build the docker image locally
sudo docker build -t magicpin_combinations .
- Run
sudo docker run -p 8000:8000 magicpin_combinations
OR
- Pull the prebuilt image from
sudo docker pull saiganesh003/magicpin_combinations
- Run
sudo docker run -p 8000:8000 saiganesh003/magicpin_combinations