Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

how to read the yahoo Inbox mail using www::Mechanize module?

by vasanthgk91 (Sexton)
on Aug 07, 2013 at 05:51 UTC ( [id://1048249]=perlquestion: print w/replies, xml ) Need Help??

vasanthgk91 has asked for the wisdom of the Perl Monks concerning the following question:

SEE my coding..how i read Inbox mail after submission?

sub loginyahoomail() { my ( $user, $password ) = @_; my $mech = WWW::Mechanize->new(); $mech->get( "https://mail.yahoo.com" ); my $c = $mech->content; if ( $c =~ m/login_form/ ) { print "Login form coming===\n"; $mech->form_name( 'login_form' ); $mech->set_fields('$user','$password'); $mech->submit(); } $c = $mech->content; print "$c"; }

After what i will do i don't know

Replies are listed 'Best First'.
Re: how to read the yahoo Inbox mail using www::Mechanize module?
by marto (Cardinal) on Aug 07, 2013 at 08:10 UTC

    Why are you trying to scrape a web interface to a mailbox when they provide IMAP access? I think you need to research the technology underlying the services you're trying to access. Attempting to scrape this violates their terms of service. They're also a really poor email platform these days IMHO, and have been for some years.

Re: how to read the yahoo Inbox mail using www::Mechanize module?
by Anonymous Monk on Aug 07, 2013 at 06:46 UTC

      Select Folder failed on Folder Stats

      use Mail::Client::Yahoo; my $y = Mail::Client::Yahoo->login( username => 'vasanthgk91@yahoo.com', password => 'password', secure => 0 ); my $Inbox=$y->select_folder('inbox'); print "$Inbox";

      This is also not working

        This is also not working

        This is the point. Look at the bug cue. Look at the source. Stop trying this. Look at YPOPs! -- 9 years is an ETERNITY to keep scraping yahoo, and after this eternity the developers stopped trying. Try this instead, ask yahoo how to programmatic-ally access their website and see what they tell you.

Re: how to read the yahoo Inbox mail using www::Mechanize module?
by Anonymous Monk on Aug 07, 2013 at 13:33 UTC
    sub loginyahoomail() {
    Don't put those parentheses in there. Prototypes are bad, mmkay?

    Also, you're probably calling your functions in the "wrong" way (with the &) if Perl is letting you call that sub with the two arguments it is expecting.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1048249]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found