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;
|
2019-12-20 20:51:10 +00:00
|
|
|
|
using System.Reactive.Linq;
|
2019-12-08 17:00:22 +00:00
|
|
|
|
using System.Text.RegularExpressions;
|
2019-12-08 19:46:30 +00:00
|
|
|
|
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;
|
2020-01-05 05:38:08 +00:00
|
|
|
|
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;
|
2019-12-26 23:26:53 +00:00
|
|
|
|
using Wabbajack.Lib.WebAutomation;
|
2019-12-08 17:00:22 +00:00
|
|
|
|
using File = Alphaleonis.Win32.Filesystem.File;
|
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Lib.Downloaders
|
|
|
|
|
{
|
2020-01-06 00:21:05 +00:00
|
|
|
|
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
|
2020-01-05 05:38:08 +00:00
|
|
|
|
public override string SiteName => "Lovers Lab";
|
2020-01-06 00:21:05 +00:00
|
|
|
|
public override Uri SiteURL => new Uri("https://www.loverslab.com");
|
2020-01-05 05:38:08 +00:00
|
|
|
|
public override Uri IconUri => new Uri("https://www.loverslab.com/favicon.ico");
|
2019-12-20 20:51:10 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
2020-01-05 05:38:08 +00:00
|
|
|
|
public LoversLabDownloader() : base(new Uri("https://www.loverslab.com/login"),
|
2020-01-06 00:21:05 +00:00
|
|
|
|
"loverslabcookies", "loverslab.com")
|
2019-12-20 20:51:10 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2020-01-05 05:38:08 +00:00
|
|
|
|
protected override async Task WhileWaiting(IWebDriver browser)
|
2019-12-08 17:00:22 +00:00
|
|
|
|
{
|
2020-01-05 05:38:08 +00:00
|
|
|
|
try
|
2019-12-08 17:00:22 +00:00
|
|
|
|
{
|
2020-01-05 05:38:08 +00:00
|
|
|
|
await browser.EvaluateJavaScript(
|
|
|
|
|
"document.querySelectorAll(\".ll_adblock\").forEach(function (itm) { itm.innerHTML = \"\";});");
|
2019-12-08 17:00:22 +00:00
|
|
|
|
}
|
2020-01-05 05:38:08 +00:00
|
|
|
|
catch (Exception ex)
|
2019-12-08 17:00:22 +00:00
|
|
|
|
{
|
2020-01-05 05:38:08 +00:00
|
|
|
|
Utils.Error(ex);
|
2019-12-08 17:00:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-01-06 00:21:05 +00:00
|
|
|
|
public class State : State<LoversLabDownloader>
|
2019-12-08 17:00:22 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|