lewishenson / FluentMetacritic

C# API for scraping Metacritic search results
MIT License
7 stars 1 forks source link

Unable to handle items where the release date is TBA. #1

Closed lewishenson closed 7 years ago

lewishenson commented 10 years ago

Exception details:

System.FormatException was unhandled HResult=-2146233033 Message=The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Source=mscorlib StackTrace: at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType) at FluentMetacritic.Scraping.Converter.SafeConvert[T](String value, T defaultValue) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\Converter.cs:line 25 at FluentMetacritic.Scraping.Converter.SafeConvert[T](String value) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\Converter.cs:line 9 at FluentMetacritic.Scraping.SearchResultScraper1.ReadValue[T](HtmlNode node, String path) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\SearchResultScraper.cs:line 25 at FluentMetacritic.Scraping.SearchResultScraper1.ReadReleaseDate(HtmlNode node) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\SearchResultScraper.cs:line 41 at FluentMetacritic.Scraping.MovieSearchResultScraper.Scrape(HtmlNode node) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\MovieSearchResultScraper.cs:line 11 at FluentMetacritic.Scraping.SearchScraper.d0.MoveNext() in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\Code\Scraping\SearchScraper.cs:line 57 at System.Linq.Enumerable.daa1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at FluentMetacritic.TestClient.Program.Main(String[] args) in c:\Users\Lewis\Dropbox\Coding\GitHub\FluentMetacritic\TestClient\Program.cs:line 12 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()