File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from ..utils import commons
4
4
from ..utils .requests import Requests as requests
5
+ import json
5
6
6
7
# --- Front page ---
8
+
7
9
def get_news (* , limit = 10 , offset = 0 ):
8
10
return commons .api_iterative ("https://api.scratch.mit.edu/news" , limit = limit , offset = offset )
9
11
@@ -100,6 +102,17 @@ def aprilfools_get_counter() -> int:
100
102
def aprilfools_increment_counter () -> int :
101
103
return requests .post ("https://api.scratch.mit.edu/surprise" )["surprise" ]
102
104
105
+ # --- Miscellaneous ---
106
+
107
+ # I'm not sure what to label this as
108
+ def scratch_team_members () -> dict :
109
+ text = requests .get ("https://scratch.mit.edu/js/credits.bundle.js" ).text
110
+ text = "[{\" userName\" " + text .split ("('[{\" userName\" " )[1 ]
111
+ text = text .split ( "\" }]')" )[0 ] + "\" }]"
112
+
113
+ return json .loads (text )
114
+
115
+
103
116
# --- Resources ---
104
117
def get_resource_urls ():
105
118
return requests .get ("https://resources.scratch.mit.edu/localized-urls.json" ).json ()
You can’t perform that action at this time.
0 commit comments