From ea8224c48b0c1668a8cf1b1e2c44b1405b17e780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20PoL=C3=A1KoSz?= Date: Mon, 1 Feb 2021 21:56:41 +0100 Subject: [PATCH] Update the domain from ncore.cc to ncore.pro --- README.md | 2 +- src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs | 2 +- src/PoLaKoSz.Ncore/NcoreClient.cs | 2 +- src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj | 8 ++++---- tests/Integration/EndPoints/LoginEndPointTests.cs | 10 +++++----- tests/Integration/EndPoints/TorrentEndPointTests.cs | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4d92de4..e6257c6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs b/src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs index f4f2699..339c71e 100644 --- a/src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs +++ b/src/PoLaKoSz.Ncore/EndPoints/LoginEndPoint.cs @@ -19,7 +19,7 @@ internal class LoginEndPoint : ILoginEndPoint static LoginEndPoint() { _cookiePath = "/"; - _cookieDomain = "ncore.cc"; + _cookieDomain = "ncore.pro"; } internal LoginEndPoint( diff --git a/src/PoLaKoSz.Ncore/NcoreClient.cs b/src/PoLaKoSz.Ncore/NcoreClient.cs index eed945c..be75bce 100644 --- a/src/PoLaKoSz.Ncore/NcoreClient.cs +++ b/src/PoLaKoSz.Ncore/NcoreClient.cs @@ -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"); diff --git a/src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj b/src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj index 378a17b..de2a68b 100644 --- a/src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj +++ b/src/PoLaKoSz.Ncore/PoLaKoSz.Ncore.csproj @@ -8,13 +8,13 @@ https://github.com/PoLaKoSz/nCore https://github.com/PoLaKoSz/nCore git - ncore ncore.cc wrapper api scraper netcore netcore2.1 + ncore ncore.pro wrapper api scraper netcore netcore2.1 https://github.com/PoLaKoSz/nCore/LICENSE PoLaKoSz.Ncore nCore - Fix a critical semantic error in the SearchParser. The enty point to the library is the PoLaKoSz.Ncore.NcoreClient class. - 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). - 1.1.1 + Update the doman from ncore.cc to ncore.pro. The enty point to the library is the PoLaKoSz.Ncore.NcoreClient class. + 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). + 1.1.2 diff --git a/tests/Integration/EndPoints/LoginEndPointTests.cs b/tests/Integration/EndPoints/LoginEndPointTests.cs index 1f185ae..68f91b7 100644 --- a/tests/Integration/EndPoints/LoginEndPointTests.cs +++ b/tests/Integration/EndPoints/LoginEndPointTests.cs @@ -22,7 +22,7 @@ public void SetUp() { endPoint = new NcoreClient(Web).Login; } - + [Test] public async Task AuthenticateWithAddsRequiredCookies() { @@ -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() { @@ -48,13 +48,13 @@ public void AuthenticateWithThrowsUnauthenticatedExceptionWhenLoginUnsuccessful( UnauthorizedException ex = Assert.ThrowsAsync(async () => await endPoint.AuthenticateWith(userConfig)); } - + [Test] public async Task AuthenticateWithDoesNothingWhenLoginSuccessful() { UserConfig userConfig = new UserConfig(null, null, null); SetServerResponse("authenticated"); - + await endPoint.AuthenticateWith(userConfig); } } diff --git a/tests/Integration/EndPoints/TorrentEndPointTests.cs b/tests/Integration/EndPoints/TorrentEndPointTests.cs index b68f518..57741b9 100644 --- a/tests/Integration/EndPoints/TorrentEndPointTests.cs +++ b/tests/Integration/EndPoints/TorrentEndPointTests.cs @@ -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]