private MovieSynopsis ParseMoviePageContent(string moviePageContent)
        {
            MovieSynopsis synopsis = new MovieSynopsis();
            HtmlDocument htmlDocument = new HtmlDocument();
            htmlDocument.LoadHtml(moviePageContent);

            synopsis.Outline = ExtractOutline(htmlDocument);
            synopsis.Plot = ExtractPlot(htmlDocument);
            synopsis.Tagline = ExtractTagline(moviePageContent);
            return synopsis;
        }
Пример #2
0
        private MovieSynopsis ParseMoviePageContent(string moviePageContent)
        {
            MovieSynopsis synopsis     = new MovieSynopsis();
            HtmlDocument  htmlDocument = new HtmlDocument();

            htmlDocument.LoadHtml(moviePageContent);

            synopsis.Outline = ExtractOutline(htmlDocument);
            synopsis.Plot    = ExtractPlot(htmlDocument);
            synopsis.Tagline = ExtractTagline(moviePageContent);
            return(synopsis);
        }
        private async Task SetFullMovieSynopsis(FullMovie movie)
        {
            MovieSynopsis synopsis = await _synopsisService.GetSynopsis(movie.ImdbId);

            if (string.IsNullOrEmpty(movie.Tagline))
            {
                movie.Tagline = synopsis.Tagline;
            }
            if (!string.IsNullOrEmpty(synopsis.Outline))
            {
                movie.Overview = synopsis.Outline;
            }
            if (!string.IsNullOrEmpty(synopsis.Plot))
            {
                movie.Plot = synopsis.Plot;
            }
        }