Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
Baguette? This would be so cool to try
- TheHedgehogGamer
- Scratcher
4 posts
scratchattach - A Scratch API wrapper (Python)
YesDoes that work for ordinary Python files?Why replit?(#682)??Any pinger besides uptimerobot?Just asking, how do you guys host your Python file? I personally like uptimerobotYou use uptimerobot with replit or can you use it with another IDE?
I use a free discord bot host page (bot-hosting.net).
My Scratch Coin project is hosted on the website
If you use the website you have to claim points 10 points for 1 week
If you make a server use the 10 points for 1 week plan
but you can also use the 40 poins for 1 month plan
You have to claim the points else the server stops antill you have enought points
But keep in mind the sever is private and free
The server has a lot of ram and cpu
And the server ip isn‘t banned on the scratchserver
Last edited by TheHedgehogGamer (June 17, 2022 11:49:37)
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
Whoa I don't really like spending 30 minutes of my life just to get 10 coins for a week Yes
My Scratch Coin project is hosted on the website
If you use the website you have to claim points 10 poins for 1 week
If you make a server use the 10 poins for 1 week plan
but you can also use the 40 poins for 1 month plan
You have to claim the poins else the server stops antill you have enought points
But keep in mind the sever is private and free
The server has a lot of ram and cpu
And the server ip isn‘t banned on the scratchserver
Btw is Repl's IP banned from Scratch?
- Crispydogs101
- Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(long unnecessary quote removed by moderator - please don't spam)
Woah! You sure are good at python!
Woah! You sure are good at python!
Last edited by Paddle2See (June 28, 2022 08:28:45)
Hey! Look at this DTA!
Hej! My username is @Crispydogs101. I like listening to music, playing games, and more!
Sarah and duck, Pete the cat, Pegboard nerds, Tokyo machine, FORZA FAN!! Be High contrast Blue Be rich
- TheHedgehogGamer
- Scratcher
4 posts
scratchattach - A Scratch API wrapper (Python)
Whoa I don't really like spending 30 minutes of my life just to get 10 coins for a week Yes
My Scratch Coin project is hosted on the website
If you use the website you have to claim points 10 poins for 1 week
If you make a server use the 10 poins for 1 week plan
but you can also use the 40 poins for 1 month plan
You have to claim the poins else the server stops antill you have enought points
But keep in mind the sever is private and free
The server has a lot of ram and cpu
And the server ip isn‘t banned on the scratchserver
Btw is Repl's IP banned from Scratch?
In some repls the connection from scratchattach to scratch deosn‘t work and the error is that the ip of this project is banned on scratch
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Wait so can you do this on Pythonista 3?
Last edited by MineCodr (June 17, 2022 20:42:35)
- dinonil
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
Pythonista 3?If it supports Python and importing packages, then yes. Wait so can you do this on
Last edited by dinonil (June 17, 2022 21:03:51)
- coolgamer3355
- Scratcher
3 posts
scratchattach - A Scratch API wrapper (Python)
Scratchcloud and Scratchclient, so you may want to use one of those instead of creating an entirely new library. That being said, this still looks really cool and has a lot of potential.There are a bunch of other Scratch Python libraries out there already, such as
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
How do I make this get back the number of favs on a project?
This is what I have so far:
This is what I have so far:
import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
Last edited by MineCodr (June 17, 2022 22:20:25)
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
It's not favorates, it's favourites How do I make this get back the number of favs on a project?
This is what I have so far:import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
Maybe that's why you code doesn't work
Last edited by -Twirlblast- (June 18, 2022 00:45:06)
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Ohh, umm it works but it returns “Error: Unknown Request”It's not favorates, it's favourites How do I make this get back the number of favs on a project?
This is what I have so far:import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
Maybe that's why you code doesn't work
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
Can you screenshot me your Scratch project which is receiving the data?Ohh, umm it works but it returns “Error: Unknown Request”It's not favorates, it's favourites How do I make this get back the number of favs on a project?
This is what I have so far:import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
Maybe that's why you code doesn't work
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Last edited by MineCodr (June 18, 2022 01:28:27)
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
Can I have the Scratch project link? snipped
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Last edited by MineCodr (June 18, 2022 01:33:35)
- MineCodr
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
You know what? I Give up, this is way too difficult and not worth it.
- Nigthmare_27
- Scratcher
37 posts
scratchattach - A Scratch API wrapper (Python)
You didn't set the project variable…Ohh, umm it works but it returns “Error: Unknown Request”It's not favorates, it's favourites How do I make this get back the number of favs on a project?
This is what I have so far:import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567 <— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping():
print("Ping request received")
return "project.favorates"
client.run()
Maybe that's why you code doesn't work
- -Twirlblast-
- Scratcher
89 posts
scratchattach - A Scratch API wrapper (Python)
I see… here is the fixed Python codeOk.Can I have the Scratch project link? snipped
edit: 700th post yay…
import scratchattach as scratch3
session = scratch3.login("MineCodr", "1234567")<— #lol this isn’t my real password obviously")
conn = session.connect_cloud(project_id="706531701")
project = session.connect_project("706531701")
client = scratch3.CloudRequests(conn) #optional argument: ignore_exceptions=True
@client.request
def ping(): #called when client receives request
global project
print("Ping request received")
return project.favourites
client.run()
Last edited by -Twirlblast- (June 18, 2022 06:48:10)
- INDIOUS111
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
*sigh* I was gonna make a project with this that you can sell things, but there are now 3 of those.
- -FreeEngines-
- Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
instead of the same directory, you can use the same file. you could use import tho I have a Scratchattach bot and want to communicate with a Discord bot (both bots are in the same directory).
If I use the import Discord (Discord is the name of the file for the discord bot) the scratch bot logs in as the discord bot.
Explanation: I don‘t want to make a chat bot I want to make a feedback function so that you can write your feedback in the scratch project.define When I start as a Bot
broadcast [ connect to Discord]
give feedback to a discord channel [I hope someone can help me]