-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Urgent launcher bug fix + Chess.com checker
Fixed launcher's checker index being messed up by __pycache__ for good. Added Chess.com username checker
- Loading branch information
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.2 | ||
0.3 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
import requests, random | ||
|
||
def run(usernames:str, proxies_path:str): | ||
use_proxies = False if proxies_path == "" else True | ||
usernames = open(usernames) | ||
if use_proxies: | ||
proxies = open(proxies_path) | ||
continue_with = None | ||
if use_proxies: | ||
proxies_list = proxies.readlines() | ||
valid = [] | ||
status = 404 | ||
for username in usernames: | ||
username = username.strip('\n') | ||
this_use_proxies = use_proxies | ||
url = "https://chess.com/member/"+username.lower() | ||
try: | ||
if use_proxies: | ||
proxy = proxies_list[random.randint(0, len(proxies_list)-1)] | ||
proxy = {proxy.split('|')[0]:proxy.split('|')[1].strip('\n')} | ||
except: | ||
if continue_with == None: | ||
print("Failed to load a proxy. Perhaps your proxies.txt is empty?") | ||
continue_with = False if input("Continue with proxies? (y/N): ").lower().startswith("n") else True | ||
this_use_proxies = False | ||
if continue_with == False: | ||
continue | ||
elif this_use_proxies: | ||
r = requests.get(url, proxies=proxy) | ||
if r.status_code == status: | ||
valid.append(username) | ||
else: | ||
r = requests.get(url) | ||
if r.status_code == status: | ||
valid.append(username+'\n') | ||
open('hits.txt','w').writelines(valid) | ||
print('\nSaved valid usernames to hits.txt') | ||
usernames.close() | ||
if use_proxies: | ||
proxies.close() |
This file contains 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