Refactor and novel18 support (added cookie support in general to AbstractScraper.cs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-20 22:04:13 -04:00
parent 12a1f48fbd
commit ceb8a0db8e
59 changed files with 353 additions and 240 deletions

View File

@@ -0,0 +1,37 @@
using System.ComponentModel.DataAnnotations;
namespace Common.Models.DBDomain
{
public class Chapter : BaseEntity
{
public int ChapterNumber { get; set; }
public string Name { get; set; }
public string? Content { get; set; }
public string? RawContent { get; set; }
[Key]
public string Url { get; set; }
public DateTime? DatePosted { get; set; }
public DateTime? DateUpdated { get; set; }
public DateTime? LastContentFetch { get; set; }
[Required]
public Novel Novel { get; set; }
protected bool Equals(Chapter other)
{
return Url == other.Url;
}
public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((Chapter) obj);
}
public override int GetHashCode()
{
return Url.GetHashCode();
}
}
}