Created
May 23, 2020 01:13
-
-
Save XianThi/6c2ff4b972cad869f6e5a6fcd31a99bf to your computer and use it in GitHub Desktop.
Connected2 plus account usernames from shuffle. usage : getplusaccounts.py -c count -f filename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, json | |
from sys import argv | |
import argparse | |
plus_list = [] | |
def get_plus_accounts(loop): | |
global plus_list | |
i = 1 | |
while(loop>i): | |
content = requests.get("https://api.c2me.cc/b/shuffle") | |
json_data = (json.loads(content.content)) | |
users = json_data["online_users"] | |
for list in users: | |
if list["plus"] == True: | |
if plus_list.count(list["nick"]) <= 0 : | |
plus_list.append(list["nick"]) | |
i=i+1 | |
def save_to_file(filename): | |
global plus_list | |
with open(filename, 'w') as f: | |
for item in plus_list: | |
f.write("%s\n" % item) | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-c","--count", help="account count", action="store", type=int) | |
parser.add_argument("-f", "--filename", help="filename", action="store", type=str) | |
args = parser.parse_args() | |
if(args.count): | |
get_plus_accounts(args.count) | |
else: | |
get_plus_accounts(0) | |
if(args.filename): | |
save_to_file(args.filename) | |
else: | |
print(plus_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Çalışan halini yapmaya çalışıyorum hocam. Apileri test ediyorum. shuffle shuffle_filter ve get_filter_cities çalışmıyor sanırım. Status code 400 dönüyor.