reddit-placebot
reddit-placebot copied to clipboard
r/place comeback.
Hi, do you think this still works for new upcoming r/place? If yes I still don't understand on how to put pictures.
It throws error 403 in my case
Can we resurrect this repo? Unless there's a better one somewhere.
It throws error 403 in my case
you tried it out? and how did you get 403?
Happy to see I'm not the only person who immediately thought about this project again today.
I suspect most of the BMP -> request mapping stuff could be repurposed, but the URLs etc. have been changed for this time.
This is a Powershell request sniffed out from the browser which worked. Bearer token redacted for obvious reasons.
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36"
Invoke-WebRequest -UseBasicParsing -Uri "https://gql-realtime-2.reddit.com/query" `
-Method "POST" `
-WebSession $session `
-Headers @{
"method"="POST"
"authority"="gql-realtime-2.reddit.com"
"scheme"="https"
"path"="/query"
"sec-ch-ua"="`" Not A;Brand`";v=`"99`", `"Chromium`";v=`"99`", `"Google Chrome`";v=`"99`""
"apollographql-client-name"="mona-lisa"
"sec-ch-ua-mobile"="?0"
"authorization"="Bearer [REDACTED]"
"accept"="*/*"
"apollographql-client-version"="0.0.1"
"sec-ch-ua-platform"="`"Windows`""
"origin"="https://hot-potato.reddit.com"
"sec-fetch-site"="same-site"
"sec-fetch-mode"="cors"
"sec-fetch-dest"="empty"
"referer"="https://hot-potato.reddit.com/"
"accept-encoding"="gzip, deflate, br"
"accept-language"="en-GB,en-US;q=0.9,en;q=0.8"
} `
-ContentType "application/json" `
-Body "{`"operationName`":`"setPixel`",`"variables`":{`"input`":{`"actionName`":`"r/replace:set_pixel`",`"PixelMessageData`":{`"coordinate`":{`"x`":170,`"y`":33},`"colorIndex`":31,`"canvasIndex`":0}}},`"query`":`"mutation setPixel(`$input: ActInput!) {\n act(input: `$input) {\n data {\n ... on BasicMessage {\n id\n data {\n ... on GetUserCooldownResponseMessageData {\n nextAvailablePixelTimestamp\n __typename\n }\n ... on SetPixelResponseMessageData {\n timestamp\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n`"}"
config has changed as well, https://www.reddit.com/api/place/board-bitmap <= this doesn't point to the board anymore
Looks like https://hot-potato.reddit.com/embed/ might be the new place board. Not sure how we can get the bitmap from there yet. I've been looking at the authentication.js file to see if I can modify it for the new Auth Model.
Is there a working fork or are we all patching the current repo?
full bitmap is still loaded, but url seems to have some logic behind it. https://hot-potato.reddit.com/media/canvas-images/1648827785838-0-f-8Fg292Lw.png
first part seems to be a unix timestamp, second part (f = full, d = diff), f is always the full one, d has diff pixels
no idea for second part (0) or 4th part
Error it throws for me:
> [email protected] start > node src/run.js --harmony node:internal/modules/cjs/loader:1174 throw err; ^ SyntaxError: \reddit-placebot-master\users.json: Unexpected token } in JSON at position 45 at parse (<anonymous>) at Object.Module._extensions..json (node:internal/modules/cjs/loader:1171:22) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (C:\Users\User\Desktop\reddit-placebot-master\src\run.js:12:15) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47
node 16.14.2 LTS
Error it throws for me:
> [email protected] start > node src/run.js --harmony node:internal/modules/cjs/loader:1174 throw err; ^ SyntaxError: \reddit-placebot-master\users.json: Unexpected token } in JSON at position 45 at parse (<anonymous>) at Object.Module._extensions..json (node:internal/modules/cjs/loader:1171:22) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (C:\Users\User\Desktop\reddit-placebot-master\src\run.js:12:15) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47
node 16.14.2 LTS
That's a parse error in your users.json
you probably have a , on the second last line of your users.json
you probably have a , on the second last line of your users.json
Yeah, my bad. Now 403 for me also
Getting modhash and cookies for ...
Unhandled rejection Error: Request failed with status code 403
at createError (C:\Users\User\Desktop\reddit-placebot-master\node_modules\axios\lib\core\createError.js:15:15)
at settle (C:\Users\User\Desktop\reddit-placebot-master\node_modules\axios\lib\core\settle.js:18:12)
at IncomingMessage.handleStreamEnd (C:\Users\User\Desktop\reddit-placebot-master\node_modules\axios\lib\adapters\http.js:186:11)
at IncomingMessage.emit (node:events:538:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I feel like we should bring this to discord, friend me AstroOrbis#9797 and I'll create a group chat, something about GitHub issues is weird in short term conversations
I'm starting over from scratch at this repo, small PRs appreciated (which would move us closer to the end goal).
https://github.com/CicadaCinema/place-bot
Current state: places a single pixel at the specified coordinates
all of this aside, anyone interested in an alliance?
soooo has anyone made a working fork
soooo has anyone made a working fork
We're working on it
Can't wait!
I prefer working in the open - see https://github.com/CicadaCinema/place-bot/issues/1 for the current state of the attempt written in golang.
This repo uses old API of reddit. I think porting the same tool to the new API wouldn't be hard
full bitmap is still loaded, but url seems to have some logic behind it. https://hot-potato.reddit.com/media/canvas-images/1648827785838-0-f-8Fg292Lw.png
@werdes where do you get this URL from?
@gavjan check the network tab in dev tools
So how is this coming?
So how is this coming?
give people some time coding is hard
https://github.com/michaelshumshum/r-placer
here is my attempt. anybody who wants to help and knows python will be appreciated.
current state: logging in successful, account creation successful, adding pixels FAIL.
https://github.com/michaelshumshum/r-placer
here is my attempt. anybody who wants to help and knows python will be appreciated.
current state: logging in successful, account creation successful, adding pixels FAIL.
if you need help with things like request links i can probably help
I don't know a lot about of coding but if I can help in anyway just let me know
Are these the right urls for adding pixels?


Are these the right urls for adding pixels?
![]()
![]()
i know for certain the first one is. when you change a pixel, that url is the one that is posted to. it includes some payload data that corresponds to coordinates and color. though, i am not sure what that second one is.
https://github.com/rdeepak2002/reddit-place-script-2022 This repo works successfully, using both the pull request from carlescufi plus a fix to the useragent.
The parameter headers={'User-agent': 'placebot001'}
should be added to the requests.post line. I would add this info onto that page but I would like to bring attention to it here.
This bot is simplistic, however. It only iterates through the image and does not go back to fix pixels, and it overrides existing pixels, because it does not get any image data from the API. Is there any API call that will return the existing r/place image, so that it can be manipulated in code?