Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $show = "X"
- $doc = New-Object System.Xml.XmlDocument
- [xml]$doc = (New-Object System.Net.WebClient).DownloadString("http://thetvdb.com/api/GetSeries.php?seriesname=<$show>&language=<EN>")
- IF(($doc.data.series|where-object{$_.SeriesName -eq $show}) -eq $show)
- {$ID = $doc.data.seriesid}
- ELSE
- {
- $names = $doc.Data.series.seriesname
- write-host "Exact Match Not Found Please Try with One of the Following"
- FOREACH ($name in $names){write-host ($names)}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement