Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Meowclient - connect to Scratch with NodeJS
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
bump
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
I'm working on better types for mutes in the Session JSON, but I have a question:
In Session JSON, permissions.mute_status.currentMessageType can be either string or null right?
each comment has “id”, “username”, “content”, and “apiID” (apiID is used to put into deleteComment, console.log if you don't understand the difference)
In Session JSON, permissions.mute_status.currentMessageType can be either string or null right?
Profile comments: Is there a way to get comments using this? I wouldn't consider this a form of social interaction.
import { ScratchSession } from "meowclient"; const user = "123"; const pass = "example"; const session = new ScratchSession(); await session.init(user, pass); const myProfile = session.getProfile(user); const page = 1; const comments = await myProfile.getComments(page);
Last edited by god286 (Aug. 1, 2022 06:50:40)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Maximouse
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
It's a string. I'm not sure if it can be null – if the user is not muted it's simply omitted. In Session JSON, permissions.mute_status.currentMessageType can be either string or null right?
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
I got muted so I checked the session json:It's a string. I'm not sure if it can be null – if the user is not muted it's simply omitted. In Session JSON, permissions.mute_status.currentMessageType can be either string or null right?
mute_status: {
offenses: [Array],
showWarning: false,
muteExpiresAt: (a unix time),
currentMessageType: null
}
Last edited by god286 (Aug. 1, 2022 07:47:00)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Maximouse
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
Maybe null means a generic message.I got muted so I checked the session json:It's a string. I'm not sure if it can be null – if the user is not muted it's simply omitted. In Session JSON, permissions.mute_status.currentMessageType can be either string or null right?mute_status: {
offenses: [Array],
showWarning: false,
muteExpiresAt: (a unix time),
currentMessageType: null
}
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
I got it to say ‘account’ so it is a string or null.
There's also a ‘everything_is_totally_normal’ should I add that to the types?
There's also a ‘everything_is_totally_normal’ should I add that to the types?
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Redstone1080
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
You should add session token-based login, I don't feel safe putting my username & password into my code. (Yes I know about environment variables, but if someone has hacked into your computer and grabbed the source code, they've probably found the environment variable values too.)
const juniper = programmer && musician; // my pronouns are she/her // i am trans and bi :P // you can call me june or juni for short but i prefer juniper
juniper = programmer and musician # my pronouns are she/her # i am trans and bi :P # you can call me june or juni for short but i prefer juniper
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
If they hack your computer then they have your token and your other passwords that are more important than scratch.. but ok.. You should add session token-based login, I don't feel safe putting my username & password into my code. (Yes I know about environment variables, but if someone has hacked into your computer and grabbed the source code, they've probably found the environment variable values too.)
Current workaround:
import { ScratchSession } from "meowclient"; const session = new ScratchSession(); session.username = "me"; session.token = "abc"; session.csrfToken = "abc"; session.cookieSet = "scratchcsrftoken=" + session.csrfToken + ";scratchlanguage=en;scratchsessionsid=" + session.token + ";"; const sessionFetch = await fetch("https://scratch.mit.edu/session", { method: "GET", headers: { Cookie: this.cookieSet, "User-Agent": "Mozilla/5.0", Referer: "https://scratch.mit.edu/", Host: "scratch.mit.edu", "Cache-Control": "max-age=0, no-cache", "X-Requested-With": "XMLHttpRequest", Pragma: "no-cache", Accept: "*/*", "Accept-Encoding": "gzip, deflate, br" } }); session.sessionJSON = await sessionFetch.json();
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- TheGlassPenguin
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
sorry to bump up this old thread, but is it possible to just get the API data of something without needing to create an authenticated ScratchSession?
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
(#110)If you don't .init the scratchsession it should work
sorry to bump up this old thread, but is it possible to just get the API data of something without needing to create an authenticated ScratchSession?
Also I was about to bump it up anyways when I release 3.0
Last edited by god286 (Nov. 15, 2022 03:24:23)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
I have been working on meowclient v3, there is a PR open at https://github.com/webdev03/meowclient/pull/28 with all of the changes. It will be merged soon. Please check the code if you want to and if you find any bugs report them.
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- ajskateboarder
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
Here's a list of Python Scratch libraries I found in about 10 minutes:
Thanks for making a neat TS client for once
Thanks for making a neat TS client for once
- DifferentDance8
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
I'm technically working on a Java one, but since I am a master at procrastination, I haven't got much done. Thanks for making a neat TS client for once
Mod's Protogen Maker v2 released. I will update it when I will update it
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
Ocular reaction
Should I merge v3? Will merge tomorrow after final check
Should I merge v3? Will merge tomorrow after final check
(#113)Thanks! I am glad to see that someone likes it! If you have any feature requests please tell me.
Here's a list of Python Scratch libraries I found in about 10 minutes:
Thanks for making a neat TS client for once
(#114)Cool!I'm technically working on a Java one, but since I am a master at procrastination, I haven't got much done. Thanks for making a neat TS client for once
Last edited by god286 (Dec. 1, 2022 08:47:49)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Redstone1080
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
(#114)I'm also sorta making one in Lua (requires LuaRocks for packages tho)I'm technically working on a Java one, but since I am a master at procrastination, I haven't got much done. Thanks for making a neat TS client for once
const juniper = programmer && musician; // my pronouns are she/her // i am trans and bi :P // you can call me june or juni for short but i prefer juniper
juniper = programmer and musician # my pronouns are she/her # i am trans and bi :P # you can call me june or juni for short but i prefer juniper
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
In 1 hour I am going to merge the PR. No more delays.
Thanks to @uwv for a lot of help in the coding!
Thanks to @uwv for a lot of help in the coding!
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Redstone1080
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
buyt
const juniper = programmer && musician; // my pronouns are she/her // i am trans and bi :P // you can call me june or juni for short but i prefer juniper
juniper = programmer and musician # my pronouns are she/her # i am trans and bi :P # you can call me june or juni for short but i prefer juniper
- god286
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
What buyt
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- Redstone1080
- Scratcher
1000+ posts
Meowclient - connect to Scratch with NodeJS
(#119)It's a term I coined. It means “Bring Up Your Topic”What buyt
const juniper = programmer && musician; // my pronouns are she/her // i am trans and bi :P // you can call me june or juni for short but i prefer juniper
juniper = programmer and musician # my pronouns are she/her # i am trans and bi :P # you can call me june or juni for short but i prefer juniper
- Discussion Forums
- » Advanced Topics
- » Meowclient - connect to Scratch with NodeJS