Created
December 4, 2015 11:38
-
-
Save mertkahyaoglu/d47a882f7cf6e48930d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Komut: ./ales.pl | |
$interval = 300; | |
while (1) { | |
check(); | |
sleep($interval); | |
} | |
sub check { | |
`wget "http://sonuc.osym.gov.tr" --quiet --no-check-certificate -O SONUC`; | |
open $sonuc, "SONUC" or die "Valla açamadım: $!"; | |
while (<$sonuc>) { | |
$line = $_; | |
if ($line =~ /<a href="Sorgu.aspx\?SonucID.*(ALES)/) { | |
print "ALES AÇIKLANDI. GİT BAK HADE.\n"; | |
exit; | |
} | |
} | |
print "Hala açıklamamış. $interval saniye sonra bir daha gel!\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment