I get the following error when trying to download a specific show. It is cause by the first A tag being different that what you are expecting.
Adding a SkipWhile fixed the issue.
Id = article.SelectTag("a").SkipWhile(e => e.Attributes["data-itemid"] == null).FirstOrDefault()
.IfNotNull(e => new Guid(e.Attributes["data-itemid"].Value))
Unhandled Exception: NullReferenceException: Object reference not set to an instance of an object.
Stack Trace:
at SimpleTv.Sdk.Http.HtmlParserExtensions.<>c.b4_1(HtmlNode e) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 142
at SimpleTv.Sdk.Http.HtmlParserExtensions.IfNotNull[S,T](S source, Func`2 evaluateIfSourceNotNull) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 214
at SimpleTv.Sdk.Http.HtmlParserExtensions.<>c__DisplayClass4_0.b0(HtmlNode article) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 137
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at SimpleTv.Sdk.Http.HtmlParserExtensions.ParseEpisodes(HtmlDocument html, Show show) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 135
at SimpleTv.Sdk.Http.SimpleTvHttpClient.GetEpisodes(Show show) in C:\projects\simpletv\SimpleTv.Sdk\Http\SimpleTvHttpClient.cs:line 212
at SimpleTv.Downloader.Downloader.Download()
at SimpleTv.Downloader.Program.Main(String[] args)
I get the following error when trying to download a specific show. It is cause by the first A tag being different that what you are expecting.
Adding a SkipWhile fixed the issue. Id = article.SelectTag("a").SkipWhile(e => e.Attributes["data-itemid"] == null).FirstOrDefault() .IfNotNull(e => new Guid(e.Attributes["data-itemid"].Value))
SimpleTv.DownloadLog.2016-04-18_21-23-37.json.txt
Unhandled Exception: NullReferenceException: Object reference not set to an instance of an object. Stack Trace: at SimpleTv.Sdk.Http.HtmlParserExtensions.<>c.b4_1(HtmlNode e) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 142
at SimpleTv.Sdk.Http.HtmlParserExtensions.IfNotNull[S,T](S source, Func`2 evaluateIfSourceNotNull) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 214
at SimpleTv.Sdk.Http.HtmlParserExtensions.<>c__DisplayClass4_0.b 0(HtmlNode article) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 137
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at SimpleTv.Sdk.Http.HtmlParserExtensions.ParseEpisodes(HtmlDocument html, Show show) in C:\projects\simpletv\SimpleTv.Sdk\Http\HtmlParserExtensions.cs:line 135 at SimpleTv.Sdk.Http.SimpleTvHttpClient.GetEpisodes(Show show) in C:\projects\simpletv\SimpleTv.Sdk\Http\SimpleTvHttpClient.cs:line 212 at SimpleTv.Downloader.Downloader.Download()at SimpleTv.Downloader.Program.Main(String[] args)