コード例 #1
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;
        }
コード例 #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);
        }
コード例 #3
0
        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;
            }
        }