Discuss Scratch

MonkeyBean2
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

wvzack wrote:

Why would this code
import scratchattach as scratch3
session = scratch3.login("wvzacktest", "##################")
project = session.connect_project("1026899140")
def comment(username, code):
    test = project.comments(limit=40, offset=0)
    print(test)
comment(1, 1)
be returning the last 40 comments but if I do:
import scratchattach as scratch3
session = scratch3.login("wvzacktest", "##################")
project = session.connect_project("1026899140")
def comment(username, code):
    test = project.comments(limit=1, offset=0)
    print(test)
comment(1, 1)
It does not return the most reset comment?
and just returns empty brackets.

Weird, because this works and does exactly what you want: https://api-scratch-mit-edu.ezproxy.canberra.edu.au/users/wvzack/projects/1026899140/comments?offset=0&limit=1

also don't reveal your password length


9NAwRfSR-%dWFS$a$g&zBMTj2?;jvS?L5%^X%qpCX|A<*paJ=lU07c)wmt$v{TxL5



scratchGui.timeTravel.year = '2020'
wvzack
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

MonkeyBean2 wrote:

wvzack wrote:

Why would this code
import scratchattach as scratch3
session = scratch3.login("wvzacktest", "##################")
project = session.connect_project("1026899140")
def comment(username, code):
    test = project.comments(limit=40, offset=0)
    print(test)
comment(1, 1)
be returning the last 40 comments but if I do:
import scratchattach as scratch3
session = scratch3.login("wvzacktest", "##################")
project = session.connect_project("1026899140")
def comment(username, code):
    test = project.comments(limit=1, offset=0)
    print(test)
comment(1, 1)
It does not return the most reset comment?
and just returns empty brackets.

Weird, because this works and does exactly what you want: https://api-scratch-mit-edu.ezproxy.canberra.edu.au/users/wvzack/projects/1026899140/comments?offset=0&limit=1

also don't reveal your password length
when i try that in python it returns empty brackets but with that link it doesent (i just randomly held down on the button for password)

Likes: Programing (python scratch Lua c++ I am bad at c++ a) Aiviation (B787 Queen of the sky F35) Mountain Biking and Messing around with computers (not a gamer at all)
My projects I am most happy with also the few “polished games I have:
jale3ms
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

TimMcCool quick question? Does ScratchAttach work on PyGame? I might use PyGame so I can create a friendly developer UI for me . I saw the above post on how to activate it but is that your Scratch Username and Password or some Python login.

Thanks, also I know I am being very optimistic but with a kind heart could you lighten my stressed filled day with a follow. I am moving through to high school in Australia and going through some tough times, please read this.

“With every line of code you write,
You craft a world, you spark the light.
In every bug, find strength to grow,
Your dreams take flight, let passion flow.”

Last edited by jale3ms (Oct. 17, 2024 20:21:15)

zaid1442011
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

jale3ms wrote:

(#2743)
TimMcCool quick question? Does ScratchAttach work on PyGame? I might use PyGame so I can create a friendly developer UI for me . I saw the above post on how to activate it but is that your Scratch Username and Password or some Python login.
It's a placeholder, you need to put your Scratch username and password in your program.

I am a guy who codes weird stuff. Don’t check my GitHub only if you want stupid HTML pages (or something to host them). Check my platformer if you want to see something to see.

Profiles: GitHub.
You won't understand stuff in my signature because I talk about stuff in the ATs (Advanced Topics).
Check out this song for @griffpatch https://scratch-mit-edu.ezproxy.canberra.edu.au/projects/887382049/



Powered by DjangoBB