Skip to content

Commit

Permalink
Bugfix for issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
JnRMnT committed Feb 26, 2023
1 parent c1ca343 commit 865f0f1
Show file tree
Hide file tree
Showing 180 changed files with 1,802 additions and 587 deletions.
2 changes: 1 addition & 1 deletion JMovies.IMDb.Common/JMovies.IMDb.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>JnRMnT</Authors>
<Company>JnRMnT</Company>
<Version>1.8.2</Version>
<Version>1.8.3</Version>
<Description>JMovies IMDb Common Library - A .Net Standart class library that provides constant definitions and Extension methods for IMDb scraping.</Description>
<PackageTags>scraper,movies,movie,imdb,actor,scraping,screenscrapping,api,imdb-scraper</PackageTags>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion JMovies.IMDb.Entities/JMovies.IMDb.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Company>JnRMnT</Company>
<Copyright>JnRMnT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>1.8.2</Version>
<Version>1.8.3</Version>
<Description>JMovies IMDb Entities Library - A .Net Standart class library that provides class definitions for IMDb.</Description>
<RepositoryUrl>https://github.com/JnRMnT/JMovies.IMDb</RepositoryUrl>
<PackageTags>scraper,movies,movie,imdb,actor,scraping,screenscrapping,api,imdb-scraper</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion JMovies.IMDb/JMovies.IMDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Copyright>JnRMnT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>JMovies IMDb Data Provider Library - Currently supports on-demand screen scraping from IMDb to receive movie and person details.</Description>
<Version>1.8.2</Version>
<Version>1.8.3</Version>
<PackageTags>scraper,movies,movie,imdb,actor,scraping,screenscrapping,api,imdb-scraper</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/JnRMnT/JMovies.IMDb</RepositoryUrl>
Expand Down
6 changes: 3 additions & 3 deletions JMovies.IMDb/JMovies.IMDb.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 30 additions & 21 deletions JMovies.IMDb/Providers/IMDbScraperDataProvider.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
using HtmlAgilityPack;
using Fizzler.Systems.HtmlAgilityPack;
using HtmlAgilityPack;
using JM.Entities.Framework;
using JMovies.IMDb.Common.Constants;
using JMovies.IMDb.Entities.Interfaces;
using JMovies.IMDb.Entities.Movies;
using JMovies.IMDb.Entities.People;
using JMovies.IMDb.Entities.Interfaces;
using System.IO;
using System.Net;
using Fizzler.Systems.HtmlAgilityPack;
using System.Text.RegularExpressions;
using JMovies.IMDb.Entities.Settings;
using JMovies.IMDb.Helpers;
using JMovies.IMDb.Helpers.Movies;
using JMovies.IMDb.Helpers.People;
using System.IO;
using System.Net;
using System.Text;
using JM.Entities.Framework;
using JMovies.IMDb.Entities.Settings;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace JMovies.IMDb.Providers
Expand Down Expand Up @@ -137,6 +137,12 @@ public async Task<Movie> GetMovieAsync(long id)
return await GetMovieAsync(id, new ProductionDataFetchSettings());
}

/// <inheritdoc/>
public Movie GetMovie(long id)
{
return GetMovie(id, new ProductionDataFetchSettings());
}

/// <inheritdoc/>
public async Task<TVSeries> GetTvSeriesAsync(long id)
{
Expand All @@ -152,49 +158,52 @@ public async Task<Person> GetPersonAsync(long id)
/// <inheritdoc/>
public Production GetProduction(long id)
{
return GetProductionAsync(id).Result;
}

/// <inheritdoc/>
public Movie GetMovie(long id)
{
return GetMovieAsync(id).Result;
return GetProduction(id, new ProductionDataFetchSettings());
}

/// <inheritdoc/>
TVSeries IIMDbDataProvider.GetTvSeries(long id)
{
return GetTvSeriesAsync(id).Result;
return GetTvSeries(id, new ProductionDataFetchSettings());
}

/// <inheritdoc/>
public Production GetProduction(long id, ProductionDataFetchSettings settings)
{
return GetProductionAsync(id, settings).Result;
Task<Production> task = GetProductionAsync(id, settings);
task.Wait();
return task.Result;
}

/// <inheritdoc/>
public Movie GetMovie(long id, ProductionDataFetchSettings settings)
{
return GetMovieAsync(id, settings).Result;
Task<Production> task = GetProductionAsync(id, settings);
task.Wait();
return task.Result as Movie;
}

/// <inheritdoc/>
public TVSeries GetTvSeries(long id, ProductionDataFetchSettings settings)
{
return GetTvSeriesAsync(id, settings).Result;
Task<Production> task = GetProductionAsync(id, settings);
task.Wait();
return task.Result as TVSeries;
}

/// <inheritdoc/>
public Person GetPerson(long id, PersonDataFetchSettings settings)
{
return GetPersonAsync(id, settings).Result;
Person person = new Person();
Task<Person> task = AsyncGetPerson(id, person, settings);
task.Wait();
return task.Result;
}

/// <inheritdoc/>
public Person GetPerson(long id)
{
return GetPersonAsync(id).Result;
return GetPerson(id, new PersonDataFetchSettings());
}
}
}
5 changes: 3 additions & 2 deletions docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@
<tr id="row_0_0_5_1_4_" class="odd"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d3/d24/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_production_gallery_tests.html" target="_self">ProductionGalleryTests</a></td><td class="desc">Test suite for tests related to fetching of the gallery page of the productions </td></tr>
<tr id="row_0_0_5_1_5_" class="even"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d6d/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_runtime_tests.html" target="_self">RuntimeTests</a></td><td class="desc">Test class that contains the tests which are targeted for scraping runtime info related tests </td></tr>
<tr id="row_0_0_5_1_6_" class="odd"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d85/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_scraping_culture_tests.html" target="_self">ScrapingCultureTests</a></td><td class="desc">Test class that contains the tests which are targeted for scraping culture related tests </td></tr>
<tr id="row_0_0_5_1_7_" class="even"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/dd3/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_t_v_show_tests.html" target="_self">TVShowTests</a></td><td class="desc">Test class that contains the tests dedicated for TV Show specific information </td></tr>
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d9a/class_auto_generated_program.html" target="_self">AutoGeneratedProgram</a></td><td class="desc"></td></tr>
<tr id="row_0_0_5_1_7_" class="even"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/d7b/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_specific_movies_tests.html" target="_self">SpecificMoviesTests</a></td><td class="desc">Test class that contains the tests which are targeted for specific movies </td></tr>
<tr id="row_0_0_5_1_8_" class="odd"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/dd3/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_t_v_show_tests.html" target="_self">TVShowTests</a></td><td class="desc">Test class that contains the tests dedicated for TV Show specific information </td></tr>
<tr id="row_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d9a/class_auto_generated_program.html" target="_self">AutoGeneratedProgram</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
Expand Down
1 change: 1 addition & 0 deletions docs/html/annotated_dup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/html/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<dd><a class="el" href="dd/de6/class_j_movies_1_1_i_m_db_1_1_entities_1_1_movies_1_1_rating.html">Rating</a> (<a class="el" href="d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html">JMovies.IMDb.Entities.Movies</a>)</dd><dd><a class="el" href="dd/d13/class_j_movies_1_1_i_m_db_1_1_entities_1_1_movies_1_1_release_date.html">ReleaseDate</a> (<a class="el" href="d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html">JMovies.IMDb.Entities.Movies</a>)</dd><dd><a class="el" href="d1/d6d/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_runtime_tests.html">RuntimeTests</a> (<a class="el" href="dd/d6e/namespace_j_movies_1_1_i_m_db_1_1_tests_1_1_production.html">JMovies.IMDb.Tests.Production</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_S" name="letter_S">S</a></dt>
<dd><a class="el" href="d6/d85/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_scraping_culture_tests.html">ScrapingCultureTests</a> (<a class="el" href="dd/d6e/namespace_j_movies_1_1_i_m_db_1_1_tests_1_1_production.html">JMovies.IMDb.Tests.Production</a>)</dd></dl>
<dd><a class="el" href="d6/d85/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_scraping_culture_tests.html">ScrapingCultureTests</a> (<a class="el" href="dd/d6e/namespace_j_movies_1_1_i_m_db_1_1_tests_1_1_production.html">JMovies.IMDb.Tests.Production</a>)</dd><dd><a class="el" href="d4/d7b/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_specific_movies_tests.html">SpecificMoviesTests</a> (<a class="el" href="dd/d6e/namespace_j_movies_1_1_i_m_db_1_1_tests_1_1_production.html">JMovies.IMDb.Tests.Production</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_T" name="letter_T">T</a></dt>
<dd><a class="el" href="db/df5/class_j_movies_1_1_i_m_db_1_1_entities_1_1_movies_1_1_tag_line.html">TagLine</a> (<a class="el" href="d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html">JMovies.IMDb.Entities.Movies</a>)</dd><dd><a class="el" href="d4/df7/class_j_movies_1_1_i_m_db_1_1_entities_1_1_movies_1_1_t_v_character.html">TVCharacter</a> (<a class="el" href="d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html">JMovies.IMDb.Entities.Movies</a>)</dd><dd><a class="el" href="d0/d58/class_j_movies_1_1_i_m_db_1_1_entities_1_1_movies_1_1_t_v_series.html">TVSeries</a> (<a class="el" href="d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html">JMovies.IMDb.Entities.Movies</a>)</dd><dd><a class="el" href="dc/dd3/class_j_movies_1_1_i_m_db_1_1_tests_1_1_production_1_1_t_v_show_tests.html">TVShowTests</a> (<a class="el" href="dd/d6e/namespace_j_movies_1_1_i_m_db_1_1_tests_1_1_production.html">JMovies.IMDb.Tests.Production</a>)</dd></dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#af8e336418c6c00cf5b757d6d
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="../../d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html#af8e336418c6c00cf5b757d6dd8521983">JMovies.IMDb.Entities.Movies.CharacterTypeEnum</a></td>
<td class="memname">enum JMovies.IMDb.Entities.Movies.CharacterTypeEnum</td>
</tr>
</table>
</div><div class="memdoc">
Expand All @@ -220,7 +220,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a493b6b8166288891e7590f0a
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="../../d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html#a493b6b8166288891e7590f0a9d2a734e">JMovies.IMDb.Entities.Movies.CreditRoleType</a></td>
<td class="memname">enum JMovies.IMDb.Entities.Movies.CreditRoleType</td>
</tr>
</table>
</div><div class="memdoc">
Expand Down Expand Up @@ -258,7 +258,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ab702fea3bc2d30e12809fc1a
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="../../d1/db1/namespace_j_movies_1_1_i_m_db_1_1_entities_1_1_movies.html#ab702fea3bc2d30e12809fc1ac17a5286">JMovies.IMDb.Entities.Movies.ProductionTypeEnum</a></td>
<td class="memname">enum JMovies.IMDb.Entities.Movies.ProductionTypeEnum</td>
</tr>
</table>
</div><div class="memdoc">
Expand Down
Loading

0 comments on commit 865f0f1

Please sign in to comment.