You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""subinfo <subreddit> fetches information about the specified subreddit. Do not include /r/ when specifying a subreddit."""
196
+
"""subinfo <subreddit> fetches information about the specified subreddit."""
193
197
sub=text
198
+
ifsub.startswith('/r/'):
199
+
sub=sub[3:]
200
+
elifsub.startswith('r/'):
201
+
sub=sub[2:]
194
202
url=subreddit_url+"about.json"
195
203
r=requests.get(url.format(sub), headers=agent)
196
204
ifr.status_code!=200:
@@ -209,7 +217,7 @@ def subinfo(text):
209
217
age= (int(sub_age.days/365), "y")
210
218
else:
211
219
age= (sub_age.days, "d")
212
-
out="r/\x03{}\x02 - {} - a community for {}{}, there are {:,} subscribers and {:,} people online now.".format(name, title, age[0], age[1], subscribers, active)
220
+
out="/r/\x03{}\x02 - {} - a community for {}{}, there are {:,} subscribers and {:,} people online now.".format(name, title, age[0], age[1], subscribers, active)
0 commit comments