Hello im trying to write this code to log into pandora automatically. but i cant figure out how to get the code to hit the log in button. Ill attach the code that i have. Ive looked at different forums and tried what was said in them but it doesnt work for mine. Any input id appreciate it!
#Pandora log in info
$email = "xxxxxx@gmail.com";
$Password = "xxxxx";
$url = "http://www.pandora.com/account/sign-in"
# Create an ie com object
$ie = New-Object -com internetexplorer.application;
$ie.visible = $true;
$ie.navigate($url);
# Wait for page to load
while ($ie.Busy -eq $true)
{
Start-Sleep -Milliseconds 10000;
}
#login
Write-Host -ForegroundColor Green "Attempting to login to Pandora.";
# Add login details
$ie.Document.getElementById("email").value = $email;
$ie.Document.getElementById("password").value = $Password;
# Click the submit button
$ie.document.getElementById("sign in").click;
# Wait for the page to load while ($ie.Busy -eq $true)
{
Start-Sleep -Milliseconds 30000;
}
Pandora Log in
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Pandora Log in
I fixed a few things and threw out some distractions.
PowerShell Code
Double-click the code block to select all.#Pandora log in info $email = "xxxxxx@gmail.com"; $Password = "xxxxx"; $url = "http://www.pandora.com/account/sign-in" # Create an ie com object $ie = New-Object -com internetexplorer.application $ie.visible=$true $ie.navigate($url) while($ie.Busy){Sleep 1} # Wait for page to load Write-Host 'Attempting to login to Pandora.' -fore green # Add login details $ie.Document.getElementById("email").value=$email $ie.Document.getElementById("password").value=$Password $ie.document.getElementById("sign in").click while($ie.Busy){Sleep 1}This technique will nor work on most websites.
-
- Posts: 107
- Last visit: Thu Apr 29, 2021 8:47 am
Re: Pandora Log in
Works perfectly. Only thing I would recommend to the OP is to replace the 'http' with 'https' in the $url variable, just to avoid sending the newly created credentials unencrypted. Seems to work either way though
Mike
- forsakensun12
- Posts: 3
- Last visit: Thu Apr 24, 2014 11:35 am
Re: Pandora Log in
StupidSexyFlanders wrote:Works perfectly. Only thing I would recommend to the OP is to replace the 'http' with 'https' in the $url variable, just to avoid sending the newly created credentials unencrypted. Seems to work either way though
Ughhh i dont get why it still wont work for me!
- forsakensun12
- Posts: 3
- Last visit: Thu Apr 24, 2014 11:35 am
Re: Pandora Log in
Ok thanks for your help i appreciate it!jvierra wrote:Nope - the page has been obfuscated so you cannot auto login this way.