fix(backend): changed endpoint to /api/feed/

This commit is contained in:
Ewen 2024-05-09 08:27:45 +02:00
parent ee4fc26183
commit 7f2cbe82b1
3 changed files with 5 additions and 5 deletions

View file

@ -34,7 +34,7 @@ This project consists of two parts :
You will need to have Docker and Docker Compose installed. You will need to have Docker and Docker Compose installed.
Clone the repository, go to its root and run `docker-compose up -d`. Clone the repository, go to its root and run `docker-compose up -d`.
To use the backend directly, go to the page [http://localhost:8080/feed/](http://localhost:8080/feed/) and start adding parameters! To use the backend directly, go to the page [http://localhost:8080/api/feed/](http://localhost:8080/api/feed/) and start adding parameters!
### For production ### For production
@ -44,5 +44,5 @@ To use the backend directly, go to the page [http://localhost:8080/feed/](http:/
(as of May 2024, the web pages can change over time and break the generated feeds) (as of May 2024, the web pages can change over time and break the generated feeds)
- [http://localhost:8080/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien&section=section&sectionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time](http://localhost:8080/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien&section=section&sectionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time) - [http://localhost:8080/api/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien&section=section&sectionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time](http://localhost:8080/api/feed/?url=https://www.ouest-france.fr/bretagne/rennes-35000/&title=h2&titleClass=titre&article=article&datetime=time&link=a&linkClass=titre-lien&section=section&sectionClass=liste-articles&content=p&contentClass=chapeau&datetime=time&datetimeClass=meta-time)
- [http://localhost:8080/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None](http://localhost:8080/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None) - [http://localhost:8080/api/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None](http://localhost:8080/api/feed/?url=ewen.korr.bzh/fr/cv/&article=div&articleClass=card&title=h4&content=div&contentClass=details&link=None)

View file

@ -1,4 +1,4 @@
FROM python:3.11-alpine as requirements FROM python:3.11-alpine as backend
RUN apk update \ RUN apk update \
&& apk add --no-cache \ && apk add --no-cache \

View file

@ -8,7 +8,7 @@ from api.db import get_db
from .scraper import scrape from .scraper import scrape
bp = Blueprint("feed", __name__, url_prefix="/feed") bp = Blueprint("feed", __name__, url_prefix="/api/feed")
class InvalidParameters(Exception): class InvalidParameters(Exception):