Last active
July 24, 2021 23:09
-
-
Save MystPi/8fa512ba69cf9fb502fdf747f9048710 to your computer and use it in GitHub Desktop.
Prints out your recent Scratch messages. You will have to provide your Scratch username and password.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scratchclient import ScratchSession | |
import re | |
session = ScratchSession("your_username", "your_password") | |
ms = session.get_messages() | |
for m in ms: | |
if m.type == "addcomment": | |
frag = re.sub(r"\&\#39;", "'", m.comment_fragment) | |
frag = re.sub(r"\"", '"', frag) | |
print(f"({m.actor}) " + frag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment