#!/usr/bin/perl # # googlecontacs.get_vcf -- get dump of Google Contacts (as VCARDs) # use strict; use warnings; use WWW::Mechanize; my $USER='XXXXXXX@googlemail.com'; my $PASS='XXXXXXX'; my $OUTPUTFILE=$ENV{HOME} ."/tmp/google-contacts.backup"; my $mech = WWW::Mechanize->new(); my $start = qq|https://www.google.com/accounts/ServiceLoginBoxAuth|; my $export_cmd = qq|https://mail.google.com/mail/contacts/data/export?groupToExport=%5EMine&exportType=ALL&out=VCARD|; # login (to get cookie) $mech->get($start); $mech->field('Email', $USER); $mech->field('Passwd', $PASS); $mech->submit(); # get backup of all contacts as VCARDs $mech->get( $export_cmd, ':content_file' => $OUTPUTFILE ); if ( not $mech->success() ) { die "ERROR: Download of google contacts did not work: $!"; }
Could not open input file: /var/www/spiegl.de/infolinks.php