[Python] Using readability in python on deployed render app

Discussão em 'Python' iniciado por Stack, Junho 16, 2025.

  1. Stack

    Stack Membro Participativo

    I'm running a FastAPI app that is the backend of my software on render.

    The problem is that I do a lot of scraping and content extraction, and now I wanna use both readability (that needs node js) and playwright (that needs chromium).

    For now I'm just doing in a .sh file the needed installs like that :

    #!/bin/bash

    # Install dependencies
    pip install -r requirements.txt

    # Install playwright
    python3 -m playwright install

    # Installer Node.js et npm (assurer que npm est disponible)
    apt-get update
    apt-get install -y nodejs npm

    # Vérifier la version de Node.js
    node -v
    npm -v

    # Installer les dépendances Node.js
    cd /opt/render/project/src/.venv/lib/python3.11/site-packages/readabilipy/javascript
    npm install


    Node seems to work fine, but I have an error that apparently many people had when using headless playwright : the fact that it does not find chromium.

    Is there a good way of doing this ? I know that the best would be to use docker but I don't know it much so if it's not mandatory I'll stay with a non dockerised app, otherwise i'll do then the change.

    Thanks in advance for your replies

    Continue reading...

Compartilhe esta Página