Discuss Scratch

scratchieguy12345678
Scratcher
500+ posts

Why Doesn't This Work?

So I attempted making a function to automatically post on a topic (not for bot making purposes). Running it doesn't output any errors, but when I visit the topic the post is not there.

This is my code so far: https://replit.com/@scratchieguy123/Scratch-Forum-API-WIP#main.py

Last edited by scratchieguy12345678 (May 12, 2021 14:31:04)


gdpr5b78aa4361827f5c2a08d700
Scratcher
1000+ posts

Why Doesn't This Work?

your csrf token is set to “a”…
Raihan142857
Scratcher
1000+ posts

Why Doesn't This Work?

potatophant wrote:

your csrf token is set to “a”…
that's not why, it's because there's no cookie being sent.
Try adding “Cookie”: “scratchcsrftoken=a;scratchsessionsid={session id here};” to the request headers.

I use scratch.
GF: I'll dump you. BF: hex dump or binary dump?










scratchieguy12345678
Scratcher
500+ posts

Why Doesn't This Work?

Raihan142857 wrote:

potatophant wrote:

your csrf token is set to “a”…
that's not why, it's because there's no cookie being sent.
Try adding “Cookie”: “scratchcsrftoken=a;scratchsessionsid={session id here};” to the request headers.

How would you go about doing that?

Maximouse
Scratcher
1000+ posts

Why Doesn't This Work?

Add headers=Headers to line 41.


This is Maximouse's signature. Learn more about signatures.
linearlemur
Scratcher
500+ posts

Why Doesn't This Work?

Maximouse wrote:

Add headers=Headers to line 41.

I meant define the headers.

I found out how to put letters in cloud variables! https://turbowarp.org/526557379 (I really didn't feel like sharing the project, lol)
Maximouse
Scratcher
1000+ posts

Why Doesn't This Work?

linearlemur wrote:

Maximouse wrote:

Add headers=Headers to line 41.

I meant define the headers.
You already define them, just add them to the request.


This is Maximouse's signature. Learn more about signatures.

Powered by DjangoBB