Created
January 4, 2022 22:15
-
-
Save iNawaR1/cdd1680cd156df4c7d27fd35d70eb79f to your computer and use it in GitHub Desktop.
user checker if available on twitch. you need user list
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 | |
import time | |
head ={ | |
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', | |
'accept-encoding': 'gzip, deflate, br', | |
'accept-language': 'en-US,en;q=0.9', | |
'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="96", "Microsoft Edge";v="96"', | |
'sec-ch-ua-mobile': '?0', | |
'sec-ch-ua-platform': '"Windows"', | |
'sec-fetch-dest': 'document', | |
'sec-fetch-mode': 'navigate', | |
'sec-fetch-site': 'none', | |
'sec-fetch-user': '?1', | |
'upgrade-insecure-requests': '1', | |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62', | |
} | |
iNaWaR = 'user.txt' | |
file = open(iNaWaR, 'r') | |
ID_tele=input("[?] id Telegram : ") | |
token_bot=input("[?] bot Token : ") | |
while True : | |
user = file.readline().split('\n')[0] | |
if user == '': | |
break | |
check = f'https://apis.red/api/twitch/?user={user}' | |
rq = requests.get(check, headers=head) | |
time.sleep(0) | |
if 'Valid User' in rq.text: | |
print('[+] Available -->> {}'.format(user)) | |
tele = ( | |
f'https://api.telegram.org/bot{token_bot}/sendMessage?chat_id={ID_tele}&text=\nπ‘ πππ΄π: {user}\n\n @iNaWaR1 New Hunt ') | |
re = requests.post(tele) | |
with open('Available.txt', 'a') as x: | |
tl = 'Available USER --> ' | |
x.write(tl + user + '\n') | |
elif 'Taken User' in rq.text: | |
print(f'[-] user not available -->> @{user}') | |
else: | |
print(f'Error') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment