quick fixes
This commit is contained in:
5
main.py
5
main.py
@@ -28,7 +28,7 @@ from pathlib import Path
|
||||
from asyncio import Lock
|
||||
|
||||
# Some useful variables
|
||||
PEEHAITCHPEA_ENDPOINT = "http://localhost:9000/api.php?cmd=getselectedmessage"
|
||||
PEEHAITCHPEA_ENDPOINT = "http://peehaitchpea.libre-liberec.cz/api.php?cmd=getselectedmessage"
|
||||
PYTHAGORAS_PORT = 8000
|
||||
|
||||
# Configure logging
|
||||
@@ -359,8 +359,9 @@ async def fetch_selected_message():
|
||||
Fetches a selected message from the specified endpoint.
|
||||
Returns the message as a string or None if no message is available.
|
||||
"""
|
||||
auth = httpx.BasicAuth(username="stallman", password="gnu")
|
||||
try:
|
||||
async with httpx.AsyncClient() as client:
|
||||
async with httpx.AsyncClient(auth=auth) as client:
|
||||
response = await client.get(PEEHAITCHPEA_ENDPOINT)
|
||||
if response.status_code == 200:
|
||||
message = response.text.strip()
|
||||
|
Reference in New Issue
Block a user