Nos partenaires et nous-mêmes utilisons différentes technologies, telles que les cookies, pour personnaliser les contenus et les publicités, proposer des fonctionnalités sur les réseaux sociaux et analyser le trafic. Merci de cliquer sur le bouton ci-dessous pour donner votre accord. Vous pouvez changer d’avis et modifier vos choix à tout moment. Informations RGPD
#!/usr/bin/perl -w use strict; use warnings; my $pp=10; my $align = 0; my $pp2=10; my $align2=0; BEGIN: system('w3m -dump https://www.kinguin.net/fr/category/2911/borderlands-2-game-of-the-year-edition-steam-c d-key/ >king2.html'); sleep(8); system('grep "€" king2.html > first.txt'); system('grep -A2 "+2,00" first.txt > 2.txt'); system('grep -A3 "-" 2.txt > 3.txt '); system('grep -A1 "Acheter" 3.txt > 4.txt'); system("cat 4.txt | grep -o '.[0-9]\,[0-9][0-9]' > 5.txt"); system("perl -pe 's/\n/ /g' 5.txt > 6.txt "); my $p1 = `cat 6.txt | cut -c1-5 | sed 's/ //g'`; my $p2 = `cat 6.txt | cut -c7-11 | sed 's/ //g'`; system('w3m -dump https://www.kinguin.net/fr/category/15547/call-of-duty-modern-warfare-3-steam-key/ >cod.html'); sleep(8); system('grep "€" cod.html > cod1.txt'); system('grep -A2 "+2,00" cod1.txt > cod2.txt'); system('grep -A3 "-" cod2.txt > cod3.txt '); system('grep -A1 "Acheter" cod3.txt > cod4.txt'); system("cat cod4.txt | grep -o '.[0-9]\,[0-9][0-9]' > cod5.txt"); system("perl -pe 's/\n/ /g' cod5.txt > cod6.txt "); my $p3 = `cat cod6.txt | cut -c1-5 | sed 's/ //g'`; my $p4 = `cat cod6.txt | cut -c7-11 | sed 's/ //g'`; chomp $p1; chomp $p2; chomp $p3; chomp $p4; print " pr : $pp "; print " p1 : $p1 "; print " prcod : $pp2 "; print " p3 : $p3 "; if ($p3 eq $pp2) { if ($p3 eq $p4 && $align2 eq 0) { #envoie du sms system('perl sms.pl "A Kinguin COD"'); print"envoie du sms Alignement COD !"; $align2 = 1; $pp2 = $p3; } } if ($p1 eq $pp) { if ($p1 eq $p2 && $align eq 0) { #envoie du sms system('perl sms.pl "Alignement Kinguin"'); print"envoie du sms Alignement !"; $align = 1; $pp = $p1; } } if ($p1 ne $pp) { if ($p1 gt $pp) { #envoie du sms system('perl sms.pl "Hausse Kinguin"'); print" envoie du sms hausse de prix "; $align = 0; $pp =$p1; } if ($p1 lt $pp) { system('perl sms.pl "Baisse Kinguin"'); #envoie du sms print "envoie du sms baisse de prix"; $align = 0; $pp = $p1; } } if ($p3 ne $pp2) { if ($p3 gt $pp2) { #envoie du sms system('perl sms.pl "H Kinguin COD"'); print" envoie du sms hausse de prix COD "; $align2 = 0; $pp2 =$p3; } if ($p3 lt $pp2) { system('perl sms.pl "B Kinguin COD"'); #envoie du sms print "envoie du sms baisse de prix COD"; $align2 = 0; $pp2 = $p3; } } goto BEGIN;