Last active
July 7, 2019 17:08
-
-
Save Deathjam/64f1dc6c3206c6ec81095d5c10a9f94d to your computer and use it in GitHub Desktop.
Download dab radio icons, from https://getdigitalradio.com
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
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