First: USE IT AT YOUR OWN RISK! DO IT ONLY IF YOU KNOW WHAT YOU ARE DOING!
Second: READ THIS CAREFULLY BEFORE USING!
Third: I MIGHT NOT maintain this script, because it has done its job for me. I ve just used it to remove 500+ zombie friends. :-)
This scirpt is open source under WTFPL. :-)
Although I suck at MMD, there is still something I could do. :D
---What is this for?---
This is a script to analyze (and automatically clean if autoRemove is enabled) your Iwara friend list by:
1: Traverse your friend list, and got a list of who is ALREADY your friend.
2. Traverse this list, to analyze each user for if he/she/it belongs to (order by priority):
(1) Authors - A
(1.1) Ecchi Creator
(1.2) General Creator
(2) Fan of ecchi (Nice Friend who does not look like a zombie user, identified by his/her/its followings) - F
(3) Potential Pre-Author (Identified by his/her followers) - P
(4) Zombies (Who doesnt belong to any of (1), (2) or (3). - Z
Get counts of (1), (2), (3) and (4), and a list of zombies. Then print counts to console.
3. (If autoRemove is enabled) Traverse the list of zombies, and remove them from friend list.
---What does this need?---
Envrionment: Python 2.7 (You may need some trick to use this script if you are using Python 3.x)
And this script needs your cookie to login Iwara, and perform things mentioned before.
First, you need to set up a Python environment. Cuz you will need to run python in command line / terminal / PowerShell or whatever else.
Then open the python script in your text editor to find these lines (Line 19 to Line 34):
debug = False autoRemove = False #定义自动跳过的默认用户类别，4为错误用户，-1为禁用 autoSkip = 4 #登录cookie cookie = "Your Cookie Here" #最大重试数 max_retries = 5 #判定为好活所需的关注人数（没关注我的情况下） niceFollowing = 4 #判定为好活所需的关注人数（关注了我的情况下） niceFollowingWithMe = 3 #判定为好活所需的粉丝数（判定其是否曾经是作者） niceFollowers = 6
These are the parameters for this script:
debug : If you need some debug info you may change this to
debug = True
autoRemove : False by default, in this case this script will act as an analyzer WITHOUT removing your friends. If you need to clean zombies, change it to
autoRemove = True
autoSkip : If this script got a error after
max_retries when analyzing a user, it will give a default typeCode to identify this user. 0 for zombies. 1 for authors. 2 for Fan of ecchi. 3 for Pre-Authors. 4 for Error users (Just skip it simply). -1 to disable autoSkip (This script will pause to ask you for action). 4 by default.
cookie : You need to set up this first to log in your Iwara. About how to set up this will be mentioned next.
max_retries : 5 by default. If you have a REALLY BAD Internet to Iwara, you may increase this value. (25 for me)
niceFollowing : Least followings needed to identify a user as a Fan of ecchi (Nice Watcher Friend) WITHOUT following you. 4 by default.
niceFollowingWithMe : Least followings needed to identify a user as a Fan of ecchi (Nice Watcher Friend) WITH following you. 3 by default.
niceFollowers : Least followers needed to identify a user as a Potential Pre-Author. 4 by default.
niceFollowing, niceFollowingWithMe and niceFollowers MUST BE <= 8, or EVERYONE will be identified as ZOMBIE!
---How to set up cookie?---
There are many ways to get cookie. I will only metion one method of them here. And it's for Firefox (Chrome may be simillar to it, maybe).
1. First, login your account in Iwara. And open any page on Iwara.
2. Press F12 to open developer tools, then select "Network". Like image below:
3. Press F5 to refresh page (for making new request). Click a request which already completed with a HTTP status code at its left side. Then click "Edit and resend".
4. Copy the whole line of Cookie in Request Header: (Without "Cookie: ")
5. Paste the cookie to script using text editor, replace the tips. (DONT REMOVE THE QUOTES!):
6. Save the script. Now it is ready to act as yourself! :-D
---All Green and Ready to Fire!---
Once you set up those parameters (especially the cookie), this script is ready to do its job.
For Windows 10 users:
Go to the folder where the .py script lies, "Shift + Right mouse key" at blank part of the explorer window, then select something like "Open CMD here" or "Open PowerShell here" to open a console window at that folder. Finally, use command
python IwaraFriendCleaner.py to run this script.
For Linux users: You are clever enough to run it without tutorial. :-)
575 Zombies. :-)
I am so happy to be friend with 200+ creators! :D
Why I made this? Cuz I found another guy who reuploaded my PRIVATE video to PornHub recently. :(
So I want to clean my friend list. But I am too lazy to do it manually, and automatic is so interesting and romantic for me. :D