Created
February 5, 2017 19:35
-
-
Save paruljain/75c8755aa1956883c2810baa349f68aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ie = New-Object -ComObject InternetExplorer.Application | |
$ie.Visible = $true | |
$ie.Navigate2('http://www.oshoworld.com/discourses/audio_hindi.asp?album_id=30') | |
while ($ie.Busy) { sleep -Milliseconds 50 } | |
$start = 117 | |
$end = 121 | |
for ($i = $start; $i -lt $end; $i++) { | |
$ie.Refresh() | |
while ($ie.Busy) { sleep -Milliseconds 50 } | |
sleep -Seconds 4 | |
$radio = $ie.Document.body.getElementsByTagName('input') | ? { $_.type -eq 'radio' } | |
$submit = $ie.Document.body.getElementsByTagName('input') | ? { $_.type -eq 'submit' } | |
$code = $ie.Document.body.getElementsByTagName('input') | ? { $_.type -eq 'text' } | |
$radio[$i].checked = $true | |
$code.value = Read-Host 'Please enter the captcha' | |
$submit.Click() | |
while ($ie.Busy) { sleep -Milliseconds 50 } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment