Now, one thing you will note is that you can either click on each eBook individually, or you can play leap-frog and click the "Download-All" button just to be hit with a "list" of the links. A few folks posted complaints about that and so far no one has posted any real solution... except for me that is.
If you head over there, and it's been published, you'll see a little PowerShell script I whipped up and posted as a comment. That script grabs the "list" and bulk downloads all the eBooks to a new folder on C:\ called "ebooks". It's pretty straight forward. I'll repost it here since it could very well be usefull for many other things.
Clear-Host
#requires -version 3.0
$ErrorActionPreference = "SilentlyContinue"
If (!(Test-Path -Path "C:\eBooks")){New-Item -ItemType Directory -Force -Path "C:\eBooks" -Confirm:$false | Out-Null}
set-location "c:\eBooks"
$Source = "http://ligman.me/29zpthb"
$List = ((Invoke-WebRequest $Source) -split '[\r\n]') |? {$_}
Foreach ($URL in $List){
Write-Host $URL -ForegroundColor Cyan
$WebClientObject = New-Object System.Net.WebClient
$WebRequest = [System.Net.WebRequest]::create($URL)
$WebResponse = $WebRequest.GetResponse()
$ActualDownloadURL = $WebResponse.ResponseUri.AbsoluteUri
$ObjectProperties = @{'Shortened
URL' = $URL;'Actual URL' = $ActualDownloadURL}
$ResultsObject = New-Object -TypeName PSObject -Property $ObjectProperties
$WebResponse.Close()
$FullURL = $ResultsObject.'Actual URL'
Write-Host 'Target URL : '$FullURL
$Count = ($FullUrl.ToCharArray() | Where-Object {$_ -eq '/'} | Measure-Object).Count
$FileName = ($FullURL.Split("/")[$Count]) -replace "%20"," "
Write-Host 'Downloading: '$FileName
Invoke-WebRequest $URL -OutFile "C:\eBooks\$FileName"
Write-Host "--------------------------------"
}
Write-Host "--- COMPLETED ---" -ForegroundColor Red
No comments:
Post a Comment