Spaces:
Running
Running
move to live slack channel + switch to hf subreddit
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ except Exception as e:
|
|
46 |
def monitor_new_posts():
|
47 |
try:
|
48 |
print("Attempting to access subreddit...")
|
49 |
-
subreddit_name = '
|
50 |
subreddit = reddit.subreddit(subreddit_name)
|
51 |
print(f"Successfully accessed subreddit: {subreddit.display_name}")
|
52 |
except Exception as e:
|
@@ -68,10 +68,10 @@ def monitor_new_posts():
|
|
68 |
else:
|
69 |
text_content += "\n_No content available (may be a link or image post)_"
|
70 |
|
71 |
-
text_content += f"
|
72 |
|
73 |
response = slack_client.chat_postMessage(
|
74 |
-
channel=
|
75 |
text=text_content,
|
76 |
thread_ts=None,
|
77 |
unfurl_links=False,
|
|
|
46 |
def monitor_new_posts():
|
47 |
try:
|
48 |
print("Attempting to access subreddit...")
|
49 |
+
subreddit_name = 'huggingface' # test
|
50 |
subreddit = reddit.subreddit(subreddit_name)
|
51 |
print(f"Successfully accessed subreddit: {subreddit.display_name}")
|
52 |
except Exception as e:
|
|
|
68 |
else:
|
69 |
text_content += "\n_No content available (may be a link or image post)_"
|
70 |
|
71 |
+
text_content += f"{submission.url}"
|
72 |
|
73 |
response = slack_client.chat_postMessage(
|
74 |
+
channel=SLACK_CHANNEL_ID,
|
75 |
text=text_content,
|
76 |
thread_ts=None,
|
77 |
unfurl_links=False,
|