wabbajack/Wabbajack.Lib/Downloaders/LoversLabDownloader.cs

54 lines
1.6 KiB
C#
Raw Normal View History

2019-12-08 17:00:22 +00:00
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
2020-01-07 05:44:05 +00:00
using System.Reactive;
2019-12-20 20:51:10 +00:00
using System.Reactive.Linq;
2019-12-08 17:00:22 +00:00
using System.Text.RegularExpressions;
using System.Threading;
2019-12-08 17:00:22 +00:00
using System.Threading.Tasks;
using System.Web;
2019-12-20 20:51:10 +00:00
using System.Windows.Input;
using CefSharp;
2019-12-20 20:51:10 +00:00
using ReactiveUI;
2019-12-08 17:00:22 +00:00
using Wabbajack.Common;
using Wabbajack.Lib.LibCefHelpers;
2019-12-20 20:51:10 +00:00
using Wabbajack.Lib.NexusApi;
2019-12-08 17:00:22 +00:00
using Wabbajack.Lib.Validation;
using Wabbajack.Lib.WebAutomation;
2019-12-08 17:00:22 +00:00
using File = Alphaleonis.Win32.Filesystem.File;
namespace Wabbajack.Lib.Downloaders
{
public class LoversLabDownloader : AbstractIPS4Downloader<LoversLabDownloader, LoversLabDownloader.State>
2019-12-08 17:00:22 +00:00
{
2019-12-20 20:51:10 +00:00
#region INeedsDownload
public override string SiteName => "Lovers Lab";
public override Uri SiteURL => new Uri("https://www.loverslab.com");
public override Uri IconUri => new Uri("https://www.loverslab.com/favicon.ico");
2019-12-20 20:51:10 +00:00
#endregion
public LoversLabDownloader() : base(new Uri("https://www.loverslab.com/login"),
"loverslabcookies", "loverslab.com")
2019-12-20 20:51:10 +00:00
{
}
protected override async Task WhileWaiting(IWebDriver browser)
2019-12-08 17:00:22 +00:00
{
try
{
await browser.EvaluateJavaScript(
"document.querySelectorAll(\".ll_adblock\").forEach(function (itm) { itm.innerHTML = \"\";});");
2019-12-08 17:00:22 +00:00
}
catch (Exception ex)
2019-12-08 17:00:22 +00:00
{
Utils.Error(ex);
2019-12-08 17:00:22 +00:00
}
}
public class State : State<LoversLabDownloader>
2019-12-08 17:00:22 +00:00
{
}
}
}