je partage pour ceux que ça intéresse
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import re
num_lines = sum(1 for line in open('liste.txt'))
print (num_lines)
while(num_lines):
with open("liste.txt", 'r', encoding='UTF-8') as file:
while (line := file.readline().rstrip()):
resultat = requests.post('https://www.jeuxvideo.com/profil/'+line+'?mode=infos').content
res=re.search("Le pseudo est banni.",resultat.decode('utf-8'))
res2=re.search("Vous êtes sur une page",resultat.decode('utf-8'))
if res is None and res2 is None:
print (line)