A little inexperienced programmer trying to write a program to enter my courses website and upload all the content (lectures, homework, etc.). Obviously, this is a password protected site, so I have to give it away. I understand LWP :: UserAgent very well and liked it and I need to use credentials. I canβt figure out how to get to the next page. I can proceed to registration, but how will perl get the result of my login?
Sample code (I pulled out log-info):
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $url = 'login URL';
$ua -> credentials(
$url,
'',
'user',
'pass'
);
my $response = $ua ->get($url);
print $response->content;
the content from the response is the same content as mine, as if I were not transmitting any credentials. Obviously, I missed something ...
Oh, one more thing on which my own course site does not have a unique URL as far as I know.