mirror of
https://github.com/NohamR/PronoteBot.git
synced 2025-07-11 16:49:54 +00:00
pronote direct integration
This commit is contained in:
parent
926accf6c1
commit
2049613f25
@ -1,4 +1,6 @@
|
|||||||
DISCORD_WEBHOOKS_PRONOTE = 'https://discord.com/api/webhooks/???'
|
DISCORD_WEBHOOKS_PRONOTE = 'https://discord.com/api/webhooks/???'
|
||||||
ENT_USERNAME = 'prenom.nom'
|
ENT_USERNAME = 'prenom.nom'
|
||||||
ENT_PASSWORD = 'mdp'
|
ENT_PASSWORD = 'mdp'
|
||||||
|
PRNT_USERNAME = 'pnom'
|
||||||
|
PRNT_PASSWORD = 'mpd'
|
||||||
ENT = 'ile_de_france'
|
ENT = 'ile_de_france'
|
@ -55,11 +55,15 @@ Le fichier Dockerfile est disponible [ici](Dockerfile). Assurez-vous de le place
|
|||||||
|
|
||||||
Pour construire l'image Docker, exécutez la commande suivante à la racine du répertoire PronoteBot :
|
Pour construire l'image Docker, exécutez la commande suivante à la racine du répertoire PronoteBot :
|
||||||
|
|
||||||
|
```bash
|
||||||
docker build -t PronoteBot:latest .
|
docker build -t PronoteBot:latest .
|
||||||
docker run -d PronoteBot:latest
|
docker run -d PronoteBot:latest
|
||||||
|
```
|
||||||
|
|
||||||
### docker-compose.yaml
|
### docker-compose.yaml
|
||||||
|
|
||||||
Le fichier docker-compose.yaml est disponible [ici](docker-compose.yaml). Assurez-vous de le placer à la racine du répertoire PronoteBot.
|
Le fichier docker-compose.yaml est disponible [ici](docker-compose.yaml). Assurez-vous de le placer à la racine du répertoire PronoteBot.
|
||||||
|
|
||||||
|
```bash
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
```
|
13
getgrades.py
13
getgrades.py
@ -11,6 +11,8 @@ load_dotenv()
|
|||||||
DISCORD_WEBHOOKS_PRONOTE = os.getenv("DISCORD_WEBHOOKS_PRONOTE")
|
DISCORD_WEBHOOKS_PRONOTE = os.getenv("DISCORD_WEBHOOKS_PRONOTE")
|
||||||
ENT_USERNAME = os.getenv("ENT_USERNAME")
|
ENT_USERNAME = os.getenv("ENT_USERNAME")
|
||||||
ENT_PASSWORD = os.getenv("ENT_PASSWORD")
|
ENT_PASSWORD = os.getenv("ENT_PASSWORD")
|
||||||
|
PRNT_USERNAME = os.getenv("PRNT_USERNAME")
|
||||||
|
PRNT_PASSWORD = os.getenv("PRNT_PASSWORD")
|
||||||
ENT = os.getenv("ENT")
|
ENT = os.getenv("ENT")
|
||||||
path = 'new/pronote/'
|
path = 'new/pronote/'
|
||||||
path =''
|
path =''
|
||||||
@ -36,10 +38,13 @@ def envoyer_message_webhook(contenu):
|
|||||||
def refresh(send):
|
def refresh(send):
|
||||||
content = ''
|
content = ''
|
||||||
try :
|
try :
|
||||||
client = pronotepy.Client('https://0910626l.index-education.net/pronote/eleve.html',
|
# client = pronotepy.Client('https://0910626l.index-education.net/pronote/eleve.html',
|
||||||
username=ENT_USERNAME,
|
# username=ENT_USERNAME,
|
||||||
password=ENT_PASSWORD,
|
# password=ENT_PASSWORD,
|
||||||
ent=globals().get(ENT)) #ile_de_france
|
# ent=globals().get(ENT)) #ile_de_france
|
||||||
|
client = pronotepy.Client('https://0910626l.index-education.net/pronote/eleve.html?login=true',
|
||||||
|
username=PRNT_USERNAME,
|
||||||
|
password=PRNT_PASSWORD)
|
||||||
if not client.logged_in:
|
if not client.logged_in:
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user