mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-18 17:17:54 +02:00
Add more Logging
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
using System.Net;
|
||||
using API.Schema;
|
||||
using HtmlAgilityPack;
|
||||
|
||||
namespace API.MangaDownloadClients;
|
||||
@ -18,16 +17,15 @@ internal class HttpDownloadClient : DownloadClient
|
||||
|
||||
internal override RequestResult MakeRequestInternal(string url, string? referrer = null, string? clickButton = null)
|
||||
{
|
||||
//TODO
|
||||
//if (clickButton is not null)
|
||||
//Log("Can not click button on static site.");
|
||||
if (clickButton is not null)
|
||||
Log.Warn("Can not click button on static site.");
|
||||
HttpResponseMessage? response = null;
|
||||
while (response is null)
|
||||
{
|
||||
HttpRequestMessage requestMessage = new(HttpMethod.Get, url);
|
||||
if (referrer is not null)
|
||||
requestMessage.Headers.Referrer = new Uri(referrer);
|
||||
//Log($"Requesting {requestType} {url}");
|
||||
Log.Debug($"Requesting {url}");
|
||||
try
|
||||
{
|
||||
response = Client.Send(requestMessage);
|
||||
|
Reference in New Issue
Block a user