Python script to mass delete PSN friends.
Short video tutorial on how to set this up: https://www.youtube.com/watch?v=CfxuU57w3Tk
- Python 3 (Download)
- Playstation Network Account
- Rename the configuration.example.json file to
configuration.json
- Log into the Playstation website
- Visit this page: https://ca.account.sony.com/api/v1/ssocookie
- Copy the npsso token and paste it in the
configuration.json
file - Install dependencies:
pip install -r requirements.txt
- Run the script
python unfriender.py
The only thing to configure is the friends you want to keep.
To do this, a list of patterns can be specified in the configuration.json
file.
Example:
If you want to keep all friends that have the word "Warrior" or "Wicked" somewhere in their name.
This is case-sensitive!
{
"npsso_token": "YOUR TOKEN",
"nameWhitelistPatterns": [
".*Warrior.*",
".*Wicked.*"
]
}
The output of the program then might look like this:
Found 12 friends
Friends to remove (9):
FierceChampion42
MightyDragon99
RadiantPhoenix48
DaringSorcerer64
DaringTitan45
MysticNinja42
VividLegend82
DaringPhoenix41
VividSamurai69
Friends to keep (3):
WickedNinja30
WickedDragon84
FierceWarrior92