1 = re.compile('&lt;parties_restant&gt;(.*?)&lt;/parties_restant&gt;')
nb_parties = int(r1.search(buff).group(1))
print &quot;Login ok&quot;

if not nb_parties:
  print &quot;Plus de parties pour aujourd'hui !&quot;
  sys.exit()
print nb_parties, &quot;parties a jouer.&quot;

make_req(&quot;user_info&quot;, {&quot;pseudo&quot;: &quot;hacker&quot;})

r2 = re.compile('&lt;id_partie&gt;(.*?)&lt;/id_partie&gt;')
i = 0
# On joue nos parties gagnantes
while nb_parties &gt; 0:
  make_req(&quot;tracking&quot;, {&qu