Загрузка...

Steam checker 2023 | best python checker steam folders

Тема в разделе Python создана пользователем lamajey 24 авг 2023. (поднята 16 мар 2025) 553 просмотра

  1. lamajey
    Good Night GIF
    я хз как сюда файл прикрепить по этому вот:
    Python
    import os
    import vdf
    import requests
    from zipfile36 import ZipFile, is_zipfile
    from bs4 import BeautifulSoup

    source_folder = 'source'
    log_file_name = 'steamchecker.log'
    personal_folder = 'personal'
    profiles = {
    'Total': 0,
    'Level > 5': 0,
    'Level > 20': 0,
    'Level > 50': 0,
    'Banned': 0,
    }

    def get_steam_profile_info(steam_id):
    profile_url = f"https://steamcommunity.com/profiles/ {steam_id}/"

    response = requests.get(profile_url)
    soup = BeautifulSoup(response.content, 'html.parser')

    level_element = soup.find('span', {'class': 'friendPlayerLevelNum'})
    if level_element:
    level = level_element.text.strip()
    else:
    level = '0'

    ban_elements = soup.find_all('div', {'class': 'profile_ban'})
    if ban_elements:
    bans = [ban_element.text.strip().split('|')[0].strip() for ban_element in ban_elements]
    else:
    bans = ['None']

    return {
    'Level': level,
    'Bans': ', '.join(bans)
    }

    def parse_loginusers_files(folder, log_file, min_level, filter_bans):
    for root, _, files in os.walk(folder):
    for file in files:
    if file == 'loginusers.vdf':
    loginusers_file_path = os.path.join(root, file)
    parse_loginusers_file(loginusers_file_path, log_file, min_level, filter_bans, profiles)
    if file.endswith('.zip'):
    zip_file_path = os.path.join(root, file)
    process_zip_file(zip_file_path, log_file, min_level, filter_bans)

    def parse_loginusers_file(file_path, log_file, min_level, filter_bans, profiles):
    with open(file_path, 'r', encoding='utf-8') as f:
    data = f.read()

    vdf_data = vdf.loads(data)
    users = vdf_data.get('users', {})

    for steam_id, user_data in users.items():
    account_name = user_data.get('AccountName', '')
    persona_name = user_data.get('PersonaName', '')

    profile_info = get_steam_profile_info(steam_id)

    if min_level and int(profile_info['Level']) < int(min_level):
    continue

    if filter_bans and profile_info['Bans'] == 'None':
    continue

    log_file.write("=" * 50 + '\n')
    log_file.write(f"Steam ID: {steam_id}\n")
    log_file.write(f"AccountName: {account_name}\n")
    log_file.write(f"PersonaName: {persona_name}\n")
    log_file.write(f"Profile: [URL]https://steamcommunity.com/profiles/[/URL] {steam_id}\n")

    for key, value in profile_info.items():
    log_file.write(f"{key}: {value}\n")

    log_file.write(f"Path: {file_path}\n")
    log_file.write("=" * 50 + '\n\n')

    profiles['Total'] += 1
    if int(profile_info['Level']) > 5:
    profiles['Level > 5'] += 1
    if int(profile_info['Level']) > 20:
    profiles['Level > 20'] += 1
    if int(profile_info['Level']) > 50:
    profiles['Level > 50'] += 1
    if profile_info['Bans'] != 'None':
    profiles['Banned'] += 1

    def process_zip_file(zip_file_path, log_file, min_level, filter_bans):
    if is_zipfile(zip_file_path):
    with ZipFile(zip_file_path, 'r') as zip_file:
    for file_info in zip_file.infolist():
    if file_info.filename.endswith('/loginusers.vdf'):
    with zip_file.open(file_info) as f:
    data = f.read().decode('iso-8859-1')
    vdf_data = vdf.loads(data)
    users = vdf_data.get('users', {})

    for steam_id, user_data in users.items():
    account_name = user_data.get('AccountName', '')
    persona_name = user_data.get('PersonaName', '')

    profile_info = get_steam_profile_info(steam_id)

    if min_level and int(profile_info['Level']) < int(min_level):
    continue

    if filter_bans and profile_info['Bans'] == 'None':
    continue

    log_file.write("=" * 50 + '\n')
    log_file.write(f"Steam ID: {steam_id}\n")
    log_file.write(f"AccountName: {account_name}\n")
    log_file.write(f"PersonaName: {persona_name}\n")
    log_file.write(f"Profile: [URL]https://steamcommunity.com/profiles/[/URL] {steam_id}\n")

    for key, value in profile_info.items():
    log_file.write(f"{key}: {value}\n")

    log_file.write(f"Path: {zip_file_path} (ZIP File)\n")
    log_file.write(f"Path inside ZIP: {file_info.filename}\n")
    log_file.write("=" * 50 + '\n\n')

    profiles['Total'] += 1
    if int(profile_info['Level']) > 5:
    profiles['Level > 5'] += 1
    if int(profile_info['Level']) > 20:
    profiles['Level > 20'] += 1
    if int(profile_info['Level']) > 50:
    profiles['Level > 50'] += 1
    if profile_info['Bans'] != 'None':
    profiles['Banned'] += 1
    else:
    print(f"The file {zip_file_path} is not a valid ZIP file.")

    def main():
    if not os.path.exists(source_folder):
    os.makedirs(source_folder)

    min_level = input("Введите минимальный уровень (целое число) или оставьте пустым: ")
    check_bans = input("Учитывать наличие банов (да/нет)? ").strip().lower()
    filter_bans = check_bans == 'да'

    print('Wait...')

    with open(log_file_name, 'w', encoding='utf-8') as log_file:
    parse_loginusers_files(source_folder, log_file, min_level, filter_bans)

    print(f'Checking is over. Profile statistics:')
    for key, value in profiles.items():
    print(f'{key}: {value}')

    input("Press any key to close...")

    main()

    После первого запуска в вашей директории создается папка 'source', в нее нужно закинуть ваши **** (можно и .zip файлы, и просто папки)
    [IMG]
    потом указываем параметры для проверки (минимальный уровень и наличие вакбана).
    Далее создается файл steamchecker.log, в который после проверки внесутся данные стимов.
    [IMG]

    Вот и все, код написан на скорую руку.
     
    24 авг 2023 Изменено
    1. Froala
  2. lamajey
    pip install zipfile36 beautifulsoup4 requests vdf
    если что :pepewhat:
     
  3. детектив
    детектив 26 авг 2023 elvis has left the building 262 19 ноя 2019
    чем это лучше этого
    [IMG]
     
    1. gpt
      детектив, ну я так понимаю что оно с папки это все собирает
Top
Загрузка...