![]() |
|
#1
|
|||
|
|||
|
I wasn't about to save all my eurobet messages to a file one by one, so I wrote a perl script that just gets them and emails them all to my gmail account. I modifyed the script a little to take out my info, so you need to put your own in if you use this.
If any of you use linux, this should be easy to set up, if you use windows, you can get this running with Activestate PERL (free). Anyway, here is the script: #!/usr/bin/perl use Net::SMTP; use Net::Config; use WWW::Mechanize; #Enter your EUROBET USER/PASS in the quotes my $EUROBET_USERID=''; my $EUROBET_PASSWORD=''; ################# ## ##Enter your email info below ## my $mech = WWW::Mechanize->new(); $mech->get( 'http://www.eurobet.com/sb.go?page=index&lang=1&sid=1&ms=MS'); $mech->submit_form( form_name => 'LoginForm', fields => { username => $EUROBET_USERID, password => $EUROBET_PASSWORD, } ); if ($mech->content =~ /\"http\:\/\/.*?\&sid=(\d*)\&ms\=MS\"\)\;/){ $mech->get ( 'https://wp.eurobet.com/payeci.go?stage=40000&splash=1&dummy=0& ;mstage=1&channel=sb=slang=1&sid='. $1.'&ms=MS'); my @messages = $mech->content =~ m/\<a href\=(payeci\.go\?stage\=\d+\&mstage\=\d+\&am p;sid=\d+\&lang\=1\&ms\=MS\&channel\=s b\=slang\=\d+\&msgpos\=\d+\&msgid\=\d+\&am p;inbox\=\d+) clas/gi; print scalar @messages; for my $message (@messages){ $mech->get ('https://wp.eurobet.com/' . $message); $mech->follow_link ( text_regex =>qr/history/i); if ($mech->content =~ /(Tournament \#\d+)/){ $subject = 'Eurobet ' . $1; } ###ENTER EMAIL INFO HERE ### ##Your SMTP Server $smtp=Net::SMTP->new('YOUR_SMTP_SERVER_HERE'); ##Your Email "FROM" Address $smtp->mail('[email protected]'); ##YOUR Email "TO" Address $smtp->to('[email protected]'); $smtp->data(); ##ENTER Again, leave the slashes in $smtp->datasend("From: you\@yourdomain\.com\n"); $smtp->datasend("To: youremail\@yourdomain\.com\n"); $smtp->datasend("Subject: Hand History from PartyPoker.com $subject \n"); $smtp->datasend("\n"); $smtp->datasend($mech->content); $smtp->dataend(); $smtp->quit; } } |
|
#2
|
|||
|
|||
|
can someone who cares enough to read this post tell me if this script will just send your id and passsword to the script's author?
citanul |
|
#3
|
|||
|
|||
|
Nah, it looks legit.
|
|
#4
|
|||
|
|||
|
Nice.
|
|
#5
|
|||
|
|||
|
Only if you type in the author's email addy for him. Looks good.
|
|
#6
|
|||
|
|||
|
This would be great. Can you please, please help me. I have no clue how to do this, what program I have to download (I use Windows XP) but I would be forever grateful. I waste 15 min a day copying the HH one by one onto my computer from Eurobet.
|
|
#7
|
|||
|
|||
|
I'm going to try to knock something up to call this code, give me a little while.
|
|
#8
|
|||
|
|||
|
Ok, thanks.
Please make it simple so a computer dummy like me can do it. |
|
#9
|
|||
|
|||
|
ActiveState Perl doesn't come with WWW::Mechanize. Can't do it as it stands.
Ok, I found it on a web search. Back on with it. |
|
#10
|
|||
|
|||
|
One problem with making this super easy for computer boneheads is that they still need to enter an SMTP server to send the email. I use the SMTP server that comes with my cable internet.
I have made perl scripts easy to run for clients in the past by putting my script, activestate perl, and the modules in a single directory. Then I write a batch file to simply run the script, and the client can just click on the batch file icon. It's kind of a pain to set up through. Good luck, tigerite |
![]() |
|
|