Compare commits
No commits in common. "d0f9a4102cb771df8243e7c817d253d56ea8e318" and "682fd0bc2a9d41a2b623540794430e57b22d52d3" have entirely different histories.
d0f9a4102c
...
682fd0bc2a
@ -1,5 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using HtmlAgilityPack;
|
||||
using Tranga.Jobs;
|
||||
@ -127,17 +126,10 @@ public class Manganato : MangaConnector
|
||||
.InnerText.Replace("Description :", "");
|
||||
while (description.StartsWith('\n'))
|
||||
description = description.Substring(1);
|
||||
|
||||
string pattern = "MMM dd,yyyy HH:mm";
|
||||
|
||||
HtmlNode oldestChapter = document.DocumentNode
|
||||
.SelectNodes("//chapter-time[contains(concat(' ',normalize-space(@class),' '),' chapter-time ')]").MaxBy(
|
||||
node => DateTime.ParseExact(node.GetAttributeValue("title", "Dec 31 2400, 23:59"), pattern,
|
||||
CultureInfo.InvariantCulture))!;
|
||||
|
||||
|
||||
int year = DateTime.ParseExact(oldestChapter.GetAttributeValue("title", "Dec 31 2400, 23:59"), pattern,
|
||||
CultureInfo.InvariantCulture).Year;
|
||||
string yearString = document.DocumentNode.Descendants("li").Last(li => li.HasClass("a-h")).Descendants("span")
|
||||
.First(s => s.HasClass("chapter-time")).InnerText;
|
||||
int year = Convert.ToInt32(yearString.Split(',')[^1]) + 2000;
|
||||
|
||||
Manga manga = new (sortName, authors.ToList(), description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,
|
||||
year, originalLanguage, publicationId, releaseStatus, websiteUrl: websiteUrl);
|
||||
|
Loading…
Reference in New Issue
Block a user