Skip to content

Commit

Permalink
Update the domain from ncore.cc to ncore.pro
Browse files Browse the repository at this point in the history
  • Loading branch information
PoLaKoSz committed Feb 1, 2021
1 parent 118fb0a commit ea8224c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PoLaKoSz.Ncore

[https://ncore.cc](https://ncore.cc) is the largest hungarian torrent side. This .NET Core 2.1 library helps to access its content
[https://ncore.pro](https://ncore.pro) is the largest hungarian torrent side. This .NET Core 2.1 library helps to access its content
(Torrent details, user Hit'n'Runs, Search for Torrent).

## Install
Expand Down
2 changes: 1 addition & 1 deletion src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class LoginEndPoint : ILoginEndPoint
static LoginEndPoint()
{
_cookiePath = "/";
_cookieDomain = "ncore.cc";
_cookieDomain = "ncore.pro";
}

internal LoginEndPoint(
Expand Down
2 changes: 1 addition & 1 deletion src/PoLaKoSz.Ncore/NcoreClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public NcoreClient(HttpClientHandler messageHandler)

HttpClient client = new HttpClient(messageHandler)
{
BaseAddress = new Uri("https://ncore.cc/"),
BaseAddress = new Uri("https://ncore.pro/"),
};
client.DefaultRequestHeaders.Add("User-Agent", " Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3982.0 Safari/537.36");

Expand Down
8 changes: 4 additions & 4 deletions src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<PackageProjectUrl>https://github.com/PoLaKoSz/nCore</PackageProjectUrl>
<RepositoryUrl>https://github.com/PoLaKoSz/nCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>ncore ncore.cc wrapper api scraper netcore netcore2.1</PackageTags>
<PackageTags>ncore ncore.pro wrapper api scraper netcore netcore2.1</PackageTags>
<PackageLicenseUrl>https://github.com/PoLaKoSz/nCore/LICENSE</PackageLicenseUrl>
<PackageId>PoLaKoSz.Ncore</PackageId>
<Product>nCore</Product>
<PackageReleaseNotes>Fix a critical semantic error in the SearchParser. The enty point to the library is the PoLaKoSz.Ncore.NcoreClient class.</PackageReleaseNotes>
<Description>nCore.cc is the largest hungarian torrent side. This .NET Core 2.1 library helps to access its content (Torrent details, user Hit'n'Runs, Search for Torrent).</Description>
<Version>1.1.1</Version>
<PackageReleaseNotes>Update the doman from ncore.cc to ncore.pro. The enty point to the library is the PoLaKoSz.Ncore.NcoreClient class.</PackageReleaseNotes>
<Description>nCore.pro is the largest hungarian torrent side. This .NET Core 2.1 library helps to access its content (Torrent details, user Hit'n'Runs, Search for Torrent).</Description>
<Version>1.1.2</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
10 changes: 5 additions & 5 deletions tests/Integration/EndPoints/LoginEndPointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void SetUp()
{
endPoint = new NcoreClient(Web).Login;
}

[Test]
public async Task AuthenticateWithAddsRequiredCookies()
{
Expand All @@ -31,14 +31,14 @@ public async Task AuthenticateWithAddsRequiredCookies()

await endPoint.AuthenticateWith(userConfig);

CookieCollection cookies = Web.CookieContainer.GetCookies(new System.Uri("https://ncore.cc"));
CookieCollection cookies = Web.CookieContainer.GetCookies(new System.Uri("https://ncore.pro"));
Assert.AreEqual("php", cookies["PHPSESSID"].Value);
Assert.AreEqual("p4ssw0rd", cookies["pass"].Value);
Assert.AreEqual("PoLáKoSz", cookies["nick"].Value);
Assert.AreEqual("brutecore", cookies["stilus"].Value);
Assert.AreEqual("hu", cookies["nyelv"].Value);
}

[Test]
public void AuthenticateWithThrowsUnauthenticatedExceptionWhenLoginUnsuccessful()
{
Expand All @@ -48,13 +48,13 @@ public void AuthenticateWithThrowsUnauthenticatedExceptionWhenLoginUnsuccessful(
UnauthorizedException ex = Assert.ThrowsAsync<UnauthorizedException>(async () =>
await endPoint.AuthenticateWith(userConfig));
}

[Test]
public async Task AuthenticateWithDoesNothingWhenLoginSuccessful()
{
UserConfig userConfig = new UserConfig(null, null, null);
SetServerResponse("authenticated");

await endPoint.AuthenticateWith(userConfig);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/EndPoints/TorrentEndPointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public async Task GetParseDownloadUrlCorrectly()

Torrent torrent = await endPoint.Get(-1).ConfigureAwait(false);

Assert.That(torrent.DownloadURL, Is.EqualTo(new Uri("https://ncore.cc/torrents.php?action=download&id=1683491&key=b6d64d585e5615c0721c1b008a7473bc")));
Assert.That(torrent.DownloadURL, Is.EqualTo(new Uri("https://ncore.pro/torrents.php?action=download&id=1683491&key=b6d64d585e5615c0721c1b008a7473bc")));
}

[Test]
Expand Down

0 comments on commit ea8224c

Please sign in to comment.