#96 Added single click to load all chapters.

This commit is contained in:
2024-01-03 18:37:29 +01:00
parent d986c808e3
commit 05573f65f9
4 changed files with 13 additions and 9 deletions

View File

@ -58,7 +58,7 @@ internal class ChromiumDownloadClient : DownloadClient
this.browser = DownloadBrowser().Result;
}
protected override RequestResult MakeRequestInternal(string url, string? referrer = null)
protected override RequestResult MakeRequestInternal(string url, string? referrer = null, string? clickButton = null)
{
IPage page = this.browser.NewPageAsync().Result;
page.DefaultTimeout = 10000;
@ -72,6 +72,8 @@ internal class ChromiumDownloadClient : DownloadClient
{
if (content.Contains("text/html"))
{
if(clickButton is not null)
page.ClickAsync(clickButton).Wait();
string htmlString = page.GetContentAsync().Result;
stream = new MemoryStream(Encoding.Default.GetBytes(htmlString));
document = new ();