Discuss Scratch

-Twirlblast-
Scratcher
89 posts

scratchattach - A Scratch API wrapper (Python)

gengar9 wrote:

This would be so cool to try
Baguette?

TheHedgehogGamer
Scratcher
4 posts

scratchattach - A Scratch API wrapper (Python)

-Twirlblast- wrote:

TheHedgehogGamer wrote:

Nigthmare_27 wrote:

-Twirlblast- wrote:

(#682)

Nigthmare_27 wrote:

-Twirlblast- wrote:

Just asking, how do you guys host your Python file? I personally like uptimerobot
You use uptimerobot with replit or can you use it with another IDE?
Any pinger besides uptimerobot?
??
Why replit?
I use a free discord bot host page (bot-hosting.net).
Does that work for ordinary Python files?
Yes
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)

TheHedgehogGamer wrote:

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
Whoa I don't really like spending 30 minutes of my life just to get 10 coins for a week
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!

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)

-Twirlblast- wrote:

TheHedgehogGamer wrote:

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
Whoa I don't really like spending 30 minutes of my life just to get 10 coins for a week
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)

MineCodr wrote:

Wait so can you do this on Pythonista 3?
If it supports Python and importing packages, then yes.

Last edited by dinonil (June 17, 2022 21:03:51)

coolgamer3355
Scratcher
3 posts

scratchattach - A Scratch API wrapper (Python)

NFlex23 wrote:

There are a bunch of other Scratch Python libraries out there already, such as 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.
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:
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)

MineCodr wrote:

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()
It's not favorates, it's favourites
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)

-Twirlblast- wrote:

MineCodr wrote:

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()
It's not favorates, it's favourites
Maybe that's why you code doesn't work
Ohh, umm it works but it returns “Error: Unknown Request”
-Twirlblast-
Scratcher
89 posts

scratchattach - A Scratch API wrapper (Python)

MineCodr wrote:

-Twirlblast- wrote:

MineCodr wrote:

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()
It's not favorates, it's favourites
Maybe that's why you code doesn't work
Ohh, umm it works but it returns “Error: Unknown Request”
Can you screenshot me your Scratch project which is receiving the data?

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)

MineCodr wrote:

snipped
Can I have the Scratch project link?

MineCodr
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

-Twirlblast- wrote:

MineCodr wrote:

snipped
Can I have the Scratch project link?
Ok.
edit: 700th post yay…

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)

MineCodr wrote:

-Twirlblast- wrote:

MineCodr wrote:

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()
It's not favorates, it's favourites
Maybe that's why you code doesn't work
Ohh, umm it works but it returns “Error: Unknown Request”
You didn't set the project variable…
-Twirlblast-
Scratcher
89 posts

scratchattach - A Scratch API wrapper (Python)

MineCodr wrote:

-Twirlblast- wrote:

MineCodr wrote:

snipped
Can I have the Scratch project link?
Ok.
edit: 700th post yay…
I see… here is the fixed Python code
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()
You lack basic Python programming knowledge? You ought to return with variables not string

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.

My Logo Is Below!!!







-FreeEngines-
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TheHedgehogGamer wrote:

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]
instead of the same directory, you can use the same file. you could use import tho

Powered by DjangoBB