Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
To use “session.connect_studio(”id“)”, update scratchattach using “pip install scratchattach –upgrade”
Last edited by TimMcCool (May 29, 2022 15:42:45)
- vg_coder
-
12 posts
scratchattach - A Scratch API wrapper (Python)
I have a question. Do you have to have the thing running it on all the time for it to update?
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper (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
To prevent spam, adding posts to topics is not a scratchattach feature and never will be.
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
To prevent spam, adding posts to topics is not a scratchattach feature and never will be.
If you find any bugs in the new features, please report them.
Last edited by TimMcCool (May 29, 2022 15:52:25)
- milla_carrera
-
17 posts
scratchattach - A Scratch API wrapper (Python)
when green flag clicked
move (10) steps
next costume
next costume
forever
turn cw (15) degrees
end
- KROKOBIL
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
I can't post comments on studios or projects, only on profil pages… Toggle commenting or love/fave doesn't work on projects too. But following a studio or adding/removing projects works fine.
Can you help me?
Can you help me?
Traceback (most recent call last):
File "/My_File.py“, line 31, in <module>
project.favorite()
File ”/scratchattach/scratch3/_project.py“, line 225, in favorite
cookies = self._cookies,
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py“, line 910, in json
return complexjson.loads(self.text, **kwargs)
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py“, line 348, in loads
return _default_decoder.decode(s)
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py“, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py“, line 355, in raw_decode
raise JSONDecodeError(”Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
That looks like a scratchattach bug. Weird, it was working before. I'll look into it I can't post comments on studios or projects, only on profil pages… Toggle commenting or love/fave doesn't work on projects too. But following a studio or adding/removing projects works fine.
Can you help me?Traceback (most recent call last):
File "/My_File.py“, line 31, in <module>
project.favorite()
File ”/scratchattach/scratch3/_project.py“, line 225, in favorite
cookies = self._cookies,
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py“, line 910, in json
return complexjson.loads(self.text, **kwargs)
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py“, line 348, in loads
return _default_decoder.decode(s)
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py“, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File ”/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py“, line 355, in raw_decode
raise JSONDecodeError(”Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
Last edited by TimMcCool (May 29, 2022 18:28:50)
- TimMcCool
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
Thanks for reporting the problem. It looks like there were some bug with loving / faving projects and posting comments. These bugs are fixed now. Use I can't post comments on studios or projects, only on profil pages… Toggle commenting or love/fave doesn't work on projects too. But following a studio or adding/removing projects works fine.
Can you help me?…
pip install scratchattach --upgrade
- hmbadger
-
27 posts
scratchattach - A Scratch API wrapper (Python)
Sick!
This Can Help Me With Projects!
This Can Help Me With Projects!
- dyllyu
-
2 posts
scratchattach - A Scratch API wrapper (Python)
i dont have pip, so how am i supposed to dowload this? thanks
- KROKOBIL
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
Go to i dont have pip, so how am i supposed to dowload this? thanksgithub an click Code 》Download ZIP. Open the ZIP file in the folder with your python code. Then you can import it with “import scratchattach as scratch3”.
@TimMcCool: Please add this to your installation instruction.
- minniesworld
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
I found that pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.
- yippymishy
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.Thanks, I was about to ask about that. I found that
- KROKOBIL
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
BUG:
In every comment function you use:
It should be:
(or something like this - response is not defined)
Please change this!
In every comment function you use:
if len(response) != 40: break
if len(r) == 0: break
Please change this!
Last edited by KROKOBIL (May 30, 2022 16:33:18)
- MagicCrayon9342
-
1000+ posts
scratchattach - A Scratch API wrapper (Python)
pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.That's because ‘pip’ isn't in your PATH variable. I found that
- Funtoot_BG
-
3 posts
scratchattach - A Scratch API wrapper (Python)
I found that pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.
- MagicCrayon9342
-
1000+ posts
scratchattach - A Scratch API wrapper (Python)
What OS do you use? on Windows, pip is in path by default. As with linux, pip should be installed by default. Same thing with MacOS right? I found that pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.
- -FreeEngines-
-
100+ posts
scratchattach - A Scratch API wrapper (Python)
no, pip isnt installed on windows lolWhat OS do you use? on Windows, pip is in path by default. As with linux, pip should be installed by default. Same thing with MacOS right? I found that pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.
- MagicCrayon9342
-
1000+ posts
scratchattach - A Scratch API wrapper (Python)
Not by default, should of phrased that better. The Python installer installs pip as well, and adds it to the PATH.no, pip isnt installed on windows lolWhat OS do you use? on Windows, pip is in path by default. As with linux, pip should be installed by default. Same thing with MacOS right? I found that pip install scratchattach doesn't work for me, so if you have that problem then try py -m pip install scratchattach.