Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchclient - A scratch API wrapper for python
- nini2009ph
-
87 posts
scratchclient - A scratch API wrapper for python
(#560)use websockets and connect to the scratch servers
can you tell me how you made this?
I am interested in making one to suit my needs

- SomeoneOnThelnternet
-
1000+ posts
scratchclient - A scratch API wrapper for python
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
- mrcoat
-
100+ posts
scratchclient - A scratch API wrapper for python
(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
- SomeoneOnThelnternet
-
1000+ posts
scratchclient - A scratch API wrapper for python
Ok, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
- mbrick2
-
1000+ posts
scratchclient - A scratch API wrapper for python
Ok, I just mainly want to see user followers and project stats and whatnot. How do I use the API?
With python you do this
import requests user = "chiroyce" data = requests.get(f"https://mv-ezproxy-com.ezproxyberklee.flo.org/users/{user}")
the data variable will have this JSON output
{ "id": 58524660, "username": "Chiroyce", "scratchteam": false, "history": { "joined": "2020-03-25T08:04:04.000Z" }, "profile": { "id": 57596999, "images": { "90x90": "https://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/user/58524660_90x90.png?v=", "60x60": "https://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/user/58524660_60x60.png?v=", "55x55": "https://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/user/58524660_55x55.png?v=", "50x50": "https://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/user/58524660_50x50.png?v=", "32x32": "https://mv-ezproxy-com.ezproxyberklee.flo.org/get_image/user/58524660_32x32.png?v=" }, "status": "A few things... \n\nAlso any comments talking about the troll asking people to report me WILL be deleted!!", "bio": "| Boy | 14 | Python | ATer | Tech | Cars | \n| Cameras | Forums | Cricket | ☁️ Cloud |\n\n» Alt — @Chirover\n» PFP — @--Air--\n\nAlso no F4F or ads", "country": "India" } }
or you can use ScratchConnect which has it premade
- ajsya
-
1000+ posts
scratchclient - A scratch API wrapper for python
If you just want to use the Scratch API and good solution for you could be ScratchLink: https://github.com/Sid72020123/scratchlinkOk, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
- Sid72020123
-
500+ posts
scratchclient - A scratch API wrapper for python
Or ScraGet: https://github.com/Quantum-Codes/ScraGetIf you just want to use the Scratch API and good solution for you could be ScratchLink: https://github.com/Sid72020123/scratchlinkOk, I just mainly want to see user followers and project stats and whatnot. How do I use the API?(#563)Depending on what you want to do, if you just want to see user/project stats then you just use scratch's api. But there isn't really a way to comment and interact with the website without using your password.
Is it possible to add a session without my username and password? I want to use this to make a program but I don't want my password and stuff out there for anyone to see.
i've never used scratchclient before now lol
- watchthepro
-
3 posts
scratchclient - A scratch API wrapper for python
how to send a variable to a python from scratch?
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
I had this problem too. I can't get it to edit cloud variables even when signed in how to send a variable to a python from scratch?
Some help?
- completeness
-
100+ posts
scratchclient - A scratch API wrapper for python
Last edited by completeness (Aug. 10, 2022 16:45:00)
- 9gr
-
1000+ posts
scratchclient - A scratch API wrapper for python
(#570)Impossible since @Raihan142857 is banned RIP
Woah, some big changes happened.
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the script
print("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
Last edited by AdamKRPS425 (Aug. 31, 2022 09:48:44)
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
what could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the scriptprint("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
and now why is this not working
print("logging on...") session = ScratchSession("adamkrps425", "password") session.get_user("adamkrps426").post_comment("test")
sheesh nearly leaked my password! lol
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
Well, for me, a modified version of the code works perfectly fine! and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
print("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("DifferentDance8", "https:/scratch.mit.edu/discuss/youtube/34Ig3X59_qA in order to get my password") print("connecting to project...") connection = session.create_cloud_connection(726705370) print("setting var...") connection.set_cloud_variable("cloud", 1) print("done!")
And on the project, “cloud” is now “1” instead of “0”!
- AdamKRPS425
-
44 posts
scratchclient - A scratch API wrapper for python
really I would appreciate any helpwhat could be the problem then?i do not think so.hang on, does does the cloud variable need to start with the ☁ symbol? im having trouble with editing cloud variables in my project, I don't get an error and the script keeps running but the variable does not change on Scratch
it's in my account, the project is shared and I'm logged in on the API (ScratchSession(“admkrps425”, “ThisIsToatalyMyRealPasswordNoCap”)) and I don't know what to do.
any help please
thanks in advance
I made a new script as a test and it gets stuck connecting to the project
this is the scriptprint("init") from scratchclient import ScratchSession print("logging on...") session = ScratchSession("adamkrps425", "<placeholderpassword>") print("connecting to project...") connection = session.create_cloud_connection(726701801) print("setting var...") connection.set_cloud_variable("cloudVar", 1234) print("done!")
and this is the console output
init
logging on…
connecting to project…
(still running as the posting of this btw its been like 5 min)
and as you see the cloud var on the project is still 0
and now why is this not workingprint("logging on...") session = ScratchSession("adamkrps425", "password") session.get_user("adamkrps426").post_comment("test")
sheesh nearly leaked my password! lol
- DifferentDance8
-
1000+ posts
scratchclient - A scratch API wrapper for python
Do you get a “scratchclient.ScratchExceptions.UnauthorizedException” error (meaning a 403, and I looked through the code), or a “scratchclient.ScratchExceptions.InvalidCredentialsException” error (meaning, well, your credentials are incorrect)? really I would appreciate any help
- Discussion Forums
- » Advanced Topics
-
» scratchclient - A scratch API wrapper for python