Finding Information about TV Series

by Apr 14, 2015

PowerShell can query websites that deliver XML content, and here is an example on how to query a movie database.

Simply adjust the name of the TV series you are interested in. Optionally, use the parameter for a proxy if you have no direct Internet access.

#requires -Version 3

$name = 'stargate'
$url = "http://thetvdb.com/api/GetSeries.php?seriesname=$name&language=en"

$page = Invoke-WebRequest -Uri $url <#-Proxy 'http://proxy....:8080' -ProxyUseDefaultCredentials#>
$content = $page.Content


$xml = [XML]$content
$xml.Data.Series | Out-GridView

Twitter This Tip! ReTweet this Tip!