Discuss Scratch

redspacecat
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

hellopeepos1 wrote:

Just a quick question, but can ScratchAttach be used to make an account system for a game or no? Because considering that Python can store values sent through the cloud into a local variable, you can just have it be saved in the IDE and send the data when requested. Either that or I'm getting it completely wrong lol.
I'm pretty sure that would work

Highlight and do Shift + Down Arrow to see the rest of my signature.
Click Here To Get A Scratch 4.0 Sneak Peak!


You should probably know that I don't actually use forbidden word, I just use this bookmarklet to upload to the assets server. I wonder who else knows what forbidden word is.













































You got TROLLED
ShadowMilo
Scratcher
13 posts

scratchattach - A Scratch API wrapper (Python)

hellopeepos1 wrote:

Just a quick question, but can ScratchAttach be used to make an account system for a game or no? Because considering that Python can store values sent through the cloud into a local variable, you can just have it be saved in the IDE and send the data when requested. Either that or I'm getting it completely wrong lol.
I think so, if it can, i'm defenetly goind to include it in a 2.0 of one of my games
-King-Jack-
Scratcher
2 posts

scratchattach - A Scratch API wrapper (Python)

does it work for https://www.online-python.com/ ?

-Jack


gender: boy/him/he/male
age: 11

Coder, Gamer, Business Man
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

hellopeepos1 wrote:

Just a quick question, but can ScratchAttach be used to make an account system for a game or no? Because considering that Python can store values sent through the cloud into a local variable, you can just have it be saved in the IDE and send the data when requested. Either that or I'm getting it completely wrong lol.
I believe it can be used for that

epic coder gamer 1000
EpicCoderGamer1000
Scratcher
74 posts

scratchattach - A Scratch API wrapper (Python)

-King-Jack- wrote:

does it work for https://www.online-python.com/ ?
no

epic coder gamer 1000
nexoalex
Scratcher
55 posts

scratchattach - A Scratch API wrapper (Python)

ScratchTheCoder12345 wrote:

DocParker wrote:

supersonic734 wrote:

Scratch3.py isn't working for me.
Use pycharm and install it
PyCharm isn't free?
its to hard to use scratchattach
zeeplockd
Scratcher
1 post

scratchattach - A Scratch API wrapper (Python)

I have ran into a problem I just can't seem to fix relating to getting the comments of a users profile. Whenever I try to do it (I am signed in so using the `connect_user()` method then the `user.comments()` method) it returns a 404 error. The scratch account is definitely valid. The error says “Repl not found.” Would appreciate some help!

Code:

```
import scratchattach as scratch3
import requests

session = scratch3.login(“zeep-bot”, “******”)
myuser = session.connect_user(“zeeplockd”)

myuser.follow()
comments = myuser.comments()
print(f“{comments}\n\n”)

for message in comments:
if ‘Content’ in message and ‘how are you’ in message:
print(f"===\nFound the text in the content of a message.\nID: {message}\nUser: {message}\n===")

has_zeepbot_reply = False
if ‘Replies’ in message:
for reply in message:
if ‘User’ in reply and reply == ‘zeep-bot’:
has_zeepbot_reply = True
print(“Found a reply from ‘zeep-bot’.”)
break # Exit the loop if a previous reply is found

if not has_zeepbot_reply:
# Get user ID using the Scratch API
print(message)
api_url = f"https://api.scratch.mit.edu/users/{message}“
response = requests.get(api_url)
print(response)
datares = response.json()
myuser.reply_comment(”Great thanks!", parent_id=message, commentee_id=datares)

break # Exit the loop after posting the reply
```

Error:
```
{'message': ‘Repl not found’, ‘name’: ‘NotFoundError’, ‘status’: 404}
```

Last edited by zeeplockd (March 10, 2024 07:25:29)

TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

@zeeplockd update scratchattach

Developer of scratchattach, the most popular Python Scratch API wrapper
haydenyapts
Scratcher
16 posts

scratchattach - A Scratch API wrapper (Python)

How do I install it. I can't install it in my Command Prompt.
Pls help @TimMcCool

Last edited by haydenyapts (March 10, 2024 22:32:14)

blockgamer904
Scratcher
2 posts

scratchattach - A Scratch API wrapper (Python)

Hello, I am having problems with “import scratchattach as scratch3” as it gives the error: “ModuleNotFoundError: No module named ‘scratchattach’”. I'm sure I installed it correctly, but I'm new to python. Did I do something wrong?

~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
@cloud Blockgamer904 @cloud :: grey
Sc-JCat
Scratcher
2 posts

scratchattach - A Scratch API wrapper (Python)

i used pythonanywhere to host the code but it is blocked by scratch. i got a 403 error. is there any way to get around it?
Jay_C47
Scratcher
18 posts

scratchattach - A Scratch API wrapper (Python)

can I use scratch attach without python

Profile

Hi, call me Jay, I'm an 11-year-old boy and I like to do art. (I make banners)
(you should consider following me)

pfp by: @GummiToons


lazy sentences | Request a Banner | My Contest
blockgamer904
Scratcher
2 posts

scratchattach - A Scratch API wrapper (Python)

Jay_C47 wrote:

can I use scratch attach without python
No, you cant.

~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
@cloud Blockgamer904 @cloud :: grey
Air_heads
Scratcher
79 posts

scratchattach - A Scratch API wrapper (Python)

blockgamer904 wrote:

Hello, I am having problems with “import scratchattach as scratch3” as it gives the error: “ModuleNotFoundError: No module named ‘scratchattach’”. I'm sure I installed it correctly, but I'm new to python. Did I do something wrong?

Enter ‘pip install scratchattach’ in the terminal of your computer (or the one in your editor if your editor provides it).
justablock
Scratcher
16 posts

scratchattach - A Scratch API wrapper (Python)

how to make pfp render
justablock
Scratcher
16 posts

scratchattach - A Scratch API wrapper (Python)

Sc-JCat wrote:

i used pythonanywhere to host the code but it is blocked by scratch. i got a 403 error. is there any way to get around it?
proxy ig?
nexoalex
Scratcher
55 posts

scratchattach - A Scratch API wrapper (Python)

haydenyapts wrote:

How do I install it. I can't install it in my Command Prompt.
Pls help @TimMcCool
pip i think
nexoalex
Scratcher
55 posts

scratchattach - A Scratch API wrapper (Python)

blockgamer904 wrote:

Hello, I am having problems with “import scratchattach as scratch3” as it gives the error: “ModuleNotFoundError: No module named ‘scratchattach’”. I'm sure I installed it correctly, but I'm new to python. Did I do something wrong?
are you sure you installed it before running it and how did you install it
nexoalex
Scratcher
55 posts

scratchattach - A Scratch API wrapper (Python)

blockgamer904 wrote:

Hello, I am having problems with “import scratchattach as scratch3” as it gives the error: “ModuleNotFoundError: No module named ‘scratchattach’”. I'm sure I installed it correctly, but I'm new to python. Did I do something wrong?
i know just install pip then put pip install pip if u havent then run pip install scratchattach then youve installed it
Jay_C47
Scratcher
18 posts

scratchattach - A Scratch API wrapper (Python)

blockgamer904 wrote:

Jay_C47 wrote:

can I use scratch attach without python
No, you cant.
NOOOOOOOOOOO!!!!

Profile

Hi, call me Jay, I'm an 11-year-old boy and I like to do art. (I make banners)
(you should consider following me)

pfp by: @GummiToons


lazy sentences | Request a Banner | My Contest

Powered by DjangoBB