-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add https://test-front.mangalib.me/ support add https://hentailib.me support
- Loading branch information
Oleg Koloskov
committed
Jun 11, 2024
1 parent
10d7597
commit 62a6369
Showing
5 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 4 additions & 19 deletions
23
Elib2Ebook/Logic/Getters/LibSocial/NewSocialLib/HentaiLibGetter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
using System; | ||
using System.Text; | ||
using Elib2Ebook.Configs; | ||
using Elib2Ebook.Extensions; | ||
using Elib2Ebook.Types.SocialLib; | ||
using HtmlAgilityPack; | ||
|
||
namespace Elib2Ebook.Logic.Getters.LibSocial.NewSocialLib; | ||
namespace Elib2Ebook.Logic.Getters.LibSocial.NewSocialLib; | ||
|
||
public class HentaiLibGetter : NewLibSocialGetterBase { | ||
public class HentaiLibGetter : MangalibLibGetterBase { | ||
public HentaiLibGetter(BookGetterConfig config) : base(config) { } | ||
|
||
protected override Uri SystemUrl => new("https://hentailib.me"); | ||
|
||
protected override Uri ImagesHost => new("https://img3.imglib.info/"); | ||
|
||
protected override HtmlDocument ResponseToHtmlDoc(SocialLibBookChapter chapterResponse) { | ||
var sb = new StringBuilder(); | ||
|
||
foreach (var page in chapterResponse.Pages) { | ||
var url = SystemUrl.MakeRelativeUri(page.Url.TrimStart('/')); | ||
sb.Append($"<img src=\"{url}\" />"); | ||
} | ||
|
||
return sb.AsHtmlDoc(); | ||
} | ||
|
||
protected override Uri SystemUrl => new("https://hentailib.me/"); | ||
} |
12 changes: 12 additions & 0 deletions
12
Elib2Ebook/Logic/Getters/LibSocial/NewSocialLib/MangaLibGetter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using Elib2Ebook.Configs; | ||
|
||
namespace Elib2Ebook.Logic.Getters.LibSocial.NewSocialLib; | ||
|
||
public class MangaLibGetter : MangalibLibGetterBase { | ||
public MangaLibGetter(BookGetterConfig config) : base(config) { } | ||
|
||
protected override Uri ImagesHost => new("https://img33.imgslib.link/"); | ||
|
||
protected override Uri SystemUrl => new("https://test-front.mangalib.me/"); | ||
} |
22 changes: 22 additions & 0 deletions
22
Elib2Ebook/Logic/Getters/LibSocial/NewSocialLib/MangalibLibGetterBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Text; | ||
using Elib2Ebook.Configs; | ||
using Elib2Ebook.Extensions; | ||
using Elib2Ebook.Types.SocialLib; | ||
using HtmlAgilityPack; | ||
|
||
namespace Elib2Ebook.Logic.Getters.LibSocial.NewSocialLib; | ||
|
||
public abstract class MangalibLibGetterBase : NewLibSocialGetterBase { | ||
protected MangalibLibGetterBase(BookGetterConfig config) : base(config) { } | ||
|
||
protected override HtmlDocument ResponseToHtmlDoc(SocialLibBookChapter chapterResponse) { | ||
var sb = new StringBuilder(); | ||
|
||
foreach (var page in chapterResponse.Pages) { | ||
var url = SystemUrl.MakeRelativeUri(page.Url.TrimStart('/')); | ||
sb.Append($"<img src=\"{url}\" />"); | ||
} | ||
|
||
return sb.AsHtmlDoc(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters