Skip to content

Instantly share code, notes, and snippets.

@Deathjam
Last active July 7, 2019 17:08
Show Gist options
  • Save Deathjam/64f1dc6c3206c6ec81095d5c10a9f94d to your computer and use it in GitHub Desktop.
Save Deathjam/64f1dc6c3206c6ec81095d5c10a9f94d to your computer and use it in GitHub Desktop.
Download dab radio icons, from https://getdigitalradio.com
function Get-RadioIcons
{
param
(
[string]
[Parameter(Mandatory)]$postcode,
$output = "$env:USERPROFILE\Desktop\RadioIcons"
)
$url = "https://getdigitalradio.com/whats-on-dab/at-your-address/results?postcode=$postcode"
New-Item -ItemType Directory -Path $output -Force
$Website = Invoke-WebRequest -Uri $url -UseBasicParsing
$Images = ($Website).Images.src
$Images |
Where-Object -FilterScript {
$_ -like '*/uploads/*'
} |
ForEach-Object -Process {
Start-BitsTransfer -Source $_ -Destination $output -TransferType Download
}
Write-Host "Download Completed to $output"
explorer.exe $output
}
Get-RadioIcons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment