Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Auteur: IssouLinux
- # Dernière mise à jour: 03/03/2025
- # Exemple d'utilisation:
- # python3 check_banlist_pseudos_jvc.py liste_pseudos_jvc.txt
- # /!\ Ne permet pas de savoir si un pseudo est ban tempo ou def /!\
- import subprocess
- import time
- import sys
- from selenium import webdriver
- from selenium.webdriver.firefox.options import Options
- # Démarrer Geckodriver automatiquement en arrière-plan
- geckodriver_process = subprocess.Popen(["geckodriver", "--host", "127.0.0.1", "--port", "4444"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
- time.sleep(2) # Laisse le temps à Geckodriver de démarrer
- # Configurations Selenium
- options = Options()
- options.headless = True # Mode invisible
- options.set_preference("network.proxy.allow_hijacking_localhost", True)
- # Fonction pour vérifier le statut d'un pseudo
- def check_ban_status(driver, pseudo):
- url = f"https://www.jeuxvideo.com/profil/{pseudo.lower()}?mode=infos" # Pseudo en minuscule
- try:
- driver.get(url)
- time.sleep(3) # Attendre que la page charge
- page_source = driver.page_source.lower()
- if "banni" in page_source:
- print(f"{pseudo}: ❌ Banni")
- else:
- print(f"{pseudo}: ✅ Non banni")
- except Exception as e:
- print(f"Erreur pour {pseudo}: {str(e)}")
- # Ouvre un seul navigateur pour tous les pseudos
- def main(file_path):
- driver = webdriver.Remote(
- command_executor="http://127.0.0.1:4444",
- options=options
- )
- try:
- with open(file_path, "r") as file:
- pseudos = [line.strip() for line in file]
- for pseudo in pseudos:
- if pseudo:
- check_ban_status(driver, pseudo)
- except FileNotFoundError:
- print(f"Erreur: fichier {file_path} introuvable.")
- finally:
- driver.quit() # Ferme le navigateur à la fin
- geckodriver_process.terminate() # Tue Geckodriver quand tout est fini
- # Lancer le script
- if len(sys.argv) > 1:
- main(sys.argv[1])
- else:
- print("Usage: python3 check_jvc.py liste_pseudos_jvc.txt")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement