Advertisement
tankcr

Get TVDB

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