Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper | v1.0 released (Python)
- -FreeEngines-
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
theres a pretty high cooldown or inviting people, so that wont happen. also anyone with just a little knowledge of the scratch api could write that himselfPlease don't. This will increase auto invite spam and strain the servers. There's a reason why the Scratch Team removed the “Invite All Followers” button. - Inviting, promoting and removing curators from studios
- MarioBrosU22
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
I used my session id to log in and I get this warn
Logged in, but couldn't fetch XToken, some features may not work properly
I use replit for the hosting
Another thing i've noticed is for the stats() function, sometimes it only returns “following” and “followers”
Logged in, but couldn't fetch XToken, some features may not work properly
I use replit for the hosting
Another thing i've noticed is for the stats() function, sometimes it only returns “following” and “followers”
Last edited by MarioBrosU22 (May 28, 2022 07:18:54)
Hi its me
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
I used my session id to log in and I get this warn
Logged in, but couldn't fetch XToken, some features may not work properly
I use replit for the hosting
Another thing i've noticed is for the stats() function, sometimes it only returns “following” and “followers”
Try connecting to the cloud directly with your sessionid (cookie connect):
import scratchattach as scratch3 conn = scratch3.CloudConnection(project_id = "project_id", username="username", session_id="sessionId")
Another fix would be to provide the username when logging in with your session id:
import scratchattach as scratch3 session = scratch3.Session("sessionId", username="username") conn = session.connect_cloud(project_id="project_id")
Last edited by TimMcCool (May 28, 2022 10:52:57)
My profile / Mein Profil: @TimMcCool
- Dinosu
-
68 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
I apologize if this has already been mentioned before.
The User.is_following or is_followed_by function can be slow if the user in question is following many people, and, judging by your Replit following check API, It looks like this is because it has to check through thousands of people if that is how many people are being followed by the focus user.
If you think it would in fact make the function faster, could you please update the Replit code so that if someone does https://following-check.1tim.repl.co/api/personA/?following=personB, it checks through personA's followings if personA is following less people than personB's follower count, but it checks through personB's followers if personA is following more people than personB has followers?
Thanks in advance!
The User.is_following or is_followed_by function can be slow if the user in question is following many people, and, judging by your Replit following check API, It looks like this is because it has to check through thousands of people if that is how many people are being followed by the focus user.
If you think it would in fact make the function faster, could you please update the Replit code so that if someone does https://following-check.1tim.repl.co/api/personA/?following=personB, it checks through personA's followings if personA is following less people than personB's follower count, but it checks through personB's followers if personA is following more people than personB has followers?
Thanks in advance!
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
I just implemented that, thanks for the suggestion. However it only makes the function faster for Scratchers who are following significantly more people than they have followers. For other people (I would say most people) it makes the function slighty slower because it now has to perform two additional requests (to get the follower / following counts). I apologize if this has already been mentioned before.
The User.is_following or is_followed_by function can be slow if the user in question is following many people, and, judging by your Replit following check API, It looks like this is because it has to check through thousands of people if that is how many people are being followed by the focus user.
If you think it would in fact make the function faster, could you please update the Replit code so that if someone does https://following-check.1tim.repl.co/api/personA/?following=personB, it checks through personA's followings if personA is following less people than personB's follower count, but it checks through personB's followers if personA is following more people than personB has followers?
Thanks in advance!
Last edited by TimMcCool (May 28, 2022 14:19:58)
My profile / Mein Profil: @TimMcCool
- -Krios-
-
95 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Now make a JS library 

Hello! The (User)name's -Krios-!
I mostly create engines and animations, but sometimes you'll find some art or a game too!
Check out The Block Shop! A custom block for all your needs! We get them done fast and for free!
- -FreeEngines-
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
there are actually a few JS libaries for it, but none have so good cloud requests (checkout scratchinteract for a very poorly package using deprecated packagages and no asyn functions Now make a JS library

- kccuber
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
meowclient is also a good one from what I've heardthere are actually a few JS libaries for it, but none have so good cloud requests (checkout scratchinteract for a very poorly package using deprecated packagages and no asyn functions Now make a JS library) yeah i made my own bacakage a while ago, i think im gonna rewrite it sometime soon.. scratch3api is a good package for nodejs tho)
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
New in v0.5.4:
- Added a function that lets you see the moderation status of a project (safe, notsafe (nfe) or notreviewed)
- Added functions for a user's forum counts, forum stats and forum signature
Coming soon:
- Cloud requests for TurboWarp
- A class for forum topics
- Added a function that lets you see the moderation status of a project (safe, notsafe (nfe) or notreviewed)
- Added functions for a user's forum counts, forum stats and forum signature
Coming soon:
- Cloud requests for TurboWarp
- A class for forum topics
My profile / Mein Profil: @TimMcCool
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
…
My profile / Mein Profil: @TimMcCool
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
New in v0.5.5:
- Getting and following Forum Topics (new scratch3.ForumTopic class)
- Getting list of the forum topics in a category
- Getting forum topic change log
- Getting and editing Forum Posts (new scratch3.ForumPost class)
- Getting forum posts of a topic
- Searching forum posts all over Scratch
- Getting the forum posts made by a user
- Getting a post's ocular reactions
- Getting a user's ocular status
- Getting site statistics (from https://scratch.mit.edu/statistics/)
- Getting site health
If you find any bugs in the new features, please report them.
- Getting and following Forum Topics (new scratch3.ForumTopic class)
- Getting list of the forum topics in a category
- Getting forum topic change log
- Getting and editing Forum Posts (new scratch3.ForumPost class)
- Getting forum posts of a topic
- Searching forum posts all over Scratch
- Getting the forum posts made by a user
- Getting a post's ocular reactions
- Getting a user's ocular status
- Getting site statistics (from https://scratch.mit.edu/statistics/)
- Getting site health
If you find any bugs in the new features, please report them.
Last edited by TimMcCool (May 29, 2022 15:50:05)
My profile / Mein Profil: @TimMcCool
- god286
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Automated posts are not allowed? (test post so I can implement posts in scratchattach)

** ******** ** **
/** **////// // ****** /**
/** ****** ** ** ****** /** ***** ****** **/**///** ******
/** //////** /** /** //////** /********* **///**//**//*/**/** /**///**/
/** ******* //** /** ******* ////////**/** // /** / /**/****** /**
** /** **////** //**** **////** /**/** ** /** /**/**/// /**
//***** //******** //** //******** ******** //***** /*** /**/** //**
///// //////// // //////// //////// ///// /// // // //
- Joshisaurio
-
100+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Link pls?See the ref documentThx but how do you get it in Python? I mean I don't get it I only know how to code in Pythonsorry answering late, idk if this got answered aready.Why doesn't anyone answer? How do you even get your session ID?
when making an post request to https://scratch.mit.edu/login with {username, password} in the request body, the response the server returns contains the session id in the cookie at
caseless.dict // this returns the cookie header which you then have to extract the value from
- Sid72020123
-
500+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Using this feature can be used to spam the forums by other users… (test post so I can implement posts in scratchattach)
- PoIygon
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
(test post so I can implement posts in scratchattach)Yes I can finally spam the forums easier
Last edited by PoIygon (May 29, 2022 04:01:15)

- scratchgodo
-
1000+ posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Probably there not allowed because of spamAutomated posts are not allowed? (test post so I can implement posts in scratchattach)
Last edited by scratchgodo (May 29, 2022 06:10:01)
The cat blocks will eat all signatures not kumquats well I gave this one some signatures but there is more that will eat a signature when a signature is seen: credits in the image.
- youhan_school
-
41 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
New in v0.5.4:ok
- Added a function that lets you see the moderation status of a project (safe, notsafe (nfe) or notreviewed)
- Added functions for a user's forum counts, forum stats and forum signature
Coming soon:
- Cloud requests for TurboWarp
- A class for forum topics
Main profile: https://scratch.mit.edu/users/youhan_school/
主要页面:https://scratch.mit.edu/users/youhan_school/
Profile utama: https://scratch.mit.edu/users/youhan_school/
- youhan_school
-
41 posts
scratchattach - A Scratch API wrapper | v1.0 released (Python)
Here you go!Link pls?See the ref documentThx but how do you get it in Python? I mean I don't get it I only know how to code in Pythonsorry answering late, idk if this got answered aready.Why doesn't anyone answer? How do you even get your session ID?
when making an post request to https://scratch.mit.edu/login with {username, password} in the request body, the response the server returns contains the session id in the cookie at
caseless.dict // this returns the cookie header which you then have to extract the value from
The package is available on PyPi (Link: https://pypi.org/project/scratchattach/ ) and on GitHub (Link: https://github.com/TimMcCool/scratchattach ).
Main profile: https://scratch.mit.edu/users/youhan_school/
主要页面:https://scratch.mit.edu/users/youhan_school/
Profile utama: https://scratch.mit.edu/users/youhan_school/