A headless placeUK client written in python 3.10.
Credit to Headless-Henk and PlaceNL
- Install Python 3.10 - https://www.python.org/downloads (direct download)
- Download a zip of the script - https://github.com/G3VV/headless-uk/archive/refs/heads/main.zip
- Unzip it inside a folder
- Run
pip install -r requirements.txt
, this installs all the required stuff. (might need to dopip install -r requirements.txt --user
orpython pip install -r requirements.txt
) - Run
python index.py
(might need to dopython3 index.py
) - A file should be automatically created called
config.toml
, configure the settings inside it (see below) - Once
config.toml
is configured runpython index.py
again. - and you should be finished and the script should be running on your account!
If you encounter any issues join our Discord and ask for help in #script-support
You can configure headless-uk with using a config toml file or using env vars.
You can place 1 account in this configuration. If you want to use multiple accounts in the same process you have to
use an accounts.toml
.
- You can configure the name of the
accounts.toml
with the--accounts
flag. - You can configure the name of the
config.toml
with the--config
flag.
The accounts.toml file is very simple. It is just username="password"
on every line. Like this:
username1 = "password1"
username2 = "password2"
username3 = "password3"
If you have weird characters in your username then this is also a valid accounts.toml:
"us.er.name1" = "password1"
"us er name2" = "password2"
username3 = "password3"
You can configure the name of the accounts.toml
with the --accounts
flag.
You can set the options in a toml configuration file. By default, this file is config.toml in the same
directory as the program.
You can also change where this file is located using the --config
flag.
If you start the program without a config file present a basic config file will be created for you.
This is what the default file looks like:
reddit_username = 'YOUHAVETOADDTHIS'
reddit_password = 'YOUHAVETOADDTHIS'
chief_host = "placeuk.g3v.co.uk"
reddit_uri_https = 'https://gql-realtime-2.reddit.com/query'
reddit_uri_wss = 'wss://gql-realtime-2.reddit.com/query'
canvas_indexes = ["0", "1", "2", "3", "4", "5"] # Canvas indexes to download, Toml has no null we use 'None'
stats = false # Wether to subscribe to stats updates from chief
pingpong = false # Whether the client should show ping and pong messages.
Instead of having reddit_username
and reddit_password
you can also have:
auth_token = "INSERT TOKEN HERE"
But if you do not have reddit_username
and reddit_password
then the token will not refresh, and you have to replace it every 24 hours.
See the How to get a reddit jwt token
section for information on how to get a reddit jwt token.
Note that in the toml file the
canvas_indexes
are all strings. In the env var this different and it is a json array of numbers and null.
The easiest way is to just run login.py
to get a token. This will also automatically add the token to the config.toml
.
You can also run login.py
by doing poetry run login
. These also support the --config flag.
You can also go to the website:
- Go to r/place
- Open dev tools by pressing
ctrl+shift+i
- Click on the network tab
- Locate the pause button but do not press it, it looks like a stop button on chrome.
- Now in the list of request find a
post
request tohttps://gql-realtime-2.reddit.com/query
- Press the pause button to stop new request from coming in
- Click on the post request in the list
- Click on
headers
- Find the Authorization header
- Copy the value of the authorization header. It should start with
Bearer
and then a bunch of letters seperated.
Realize that these tokens are valid for about 1440 minutes. There is no auto token refresh functionality yet. This is also because I don't know how reddit refreshes their tokens. Let me know if you koow.
Be sure to not share this jwt with others!