Compare commits
No commits in common. "054c88712ec6c845eef53ba647aa90598f46399a" and "e95eb0497cec02d5366d75f25a2b42c5a2c7fa5d" have entirely different histories.
054c88712e
...
e95eb0497c
@ -1,5 +1,4 @@
|
|||||||
using System.Globalization;
|
using System.Net;
|
||||||
using System.Net;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using HtmlAgilityPack;
|
using HtmlAgilityPack;
|
||||||
using Tranga.Jobs;
|
using Tranga.Jobs;
|
||||||
@ -128,16 +127,9 @@ public class Manganato : MangaConnector
|
|||||||
while (description.StartsWith('\n'))
|
while (description.StartsWith('\n'))
|
||||||
description = description.Substring(1);
|
description = description.Substring(1);
|
||||||
|
|
||||||
string pattern = "MMM dd,yyyy HH:mm";
|
string yearString = document.DocumentNode.Descendants("li").Last(li => li.HasClass("a-h")).Descendants("span")
|
||||||
|
.First(s => s.HasClass("chapter-time")).InnerText;
|
||||||
HtmlNode oldestChapter = document.DocumentNode
|
int year = Convert.ToInt32(yearString.Split(',')[^1]) + 2000;
|
||||||
.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;
|
|
||||||
|
|
||||||
Manga manga = new (this, sortName, authors.ToList(), description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,
|
Manga manga = new (this, sortName, authors.ToList(), description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,
|
||||||
year, originalLanguage, publicationId, releaseStatus, websiteUrl);
|
year, originalLanguage, publicationId, releaseStatus, websiteUrl);
|
||||||
|
Loading…
Reference in New Issue
Block a user