Spaces:
Running
Running
Update alisto_project/backend/ingest_reddit.py
Browse files
alisto_project/backend/ingest_reddit.py
CHANGED
|
@@ -398,21 +398,10 @@ async def scrape_reddit():
|
|
| 398 |
print("❌ Error: Client ID or Secret missing in .env")
|
| 399 |
return
|
| 400 |
|
| 401 |
-
# DEBUG: Check if password is actually loaded
|
| 402 |
-
if not os.getenv("REDDIT_PASSWORD"):
|
| 403 |
-
print("❌ CRITICAL ERROR: .env file loaded, but REDDIT_PASSWORD is empty/missing!")
|
| 404 |
-
return
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
# NEW: Authenticated Login (REQUIRED for Hugging Face)
|
| 408 |
-
print("⚠️ Attempting Login with HARDCODED Credentials...")
|
| 409 |
-
|
| 410 |
reddit = asyncpraw.Reddit(
|
| 411 |
-
client_id=
|
| 412 |
-
client_secret=
|
| 413 |
-
user_agent="script:alisto_bot:v3.0
|
| 414 |
-
username="TetCat87",
|
| 415 |
-
password="orangecat8787"
|
| 416 |
)
|
| 417 |
|
| 418 |
try:
|
|
|
|
| 398 |
print("❌ Error: Client ID or Secret missing in .env")
|
| 399 |
return
|
| 400 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
reddit = asyncpraw.Reddit(
|
| 402 |
+
client_id=client_id,
|
| 403 |
+
client_secret=client_secret,
|
| 404 |
+
user_agent=os.getenv("REDDIT_USER_AGENT", "script:alisto_bot:v3.0")
|
|
|
|
|
|
|
| 405 |
)
|
| 406 |
|
| 407 |
try:
|