Manga4Life fix bug that made it impossible for Manga to be loaded if they did not have a "Load more Chapters" button.
https://github.com/C9Glax/tranga/issues/149 Created a check if the button exists before trying to click it.
This commit is contained in:
parent
94582496ef
commit
6a8697fc3a
@ -2,6 +2,7 @@
|
||||
using System.Text;
|
||||
using HtmlAgilityPack;
|
||||
using PuppeteerSharp;
|
||||
using PuppeteerSharp.Input;
|
||||
|
||||
namespace Tranga.MangaConnectors;
|
||||
|
||||
@ -81,7 +82,7 @@ internal class ChromiumDownloadClient : DownloadClient
|
||||
{
|
||||
if (content.Contains("text/html"))
|
||||
{
|
||||
if(clickButton is not null)
|
||||
if (clickButton is not null && page.QuerySelectorAsync(clickButton).Result is not null)
|
||||
page.ClickAsync(clickButton).Wait();
|
||||
string htmlString = page.GetContentAsync().Result;
|
||||
stream = new MemoryStream(Encoding.Default.GetBytes(htmlString));
|
||||
|
Loading…
Reference in New Issue
Block a user