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;
|
||||||
@ -127,17 +126,10 @@ public class Manganato : MangaConnector
|
|||||||
.InnerText.Replace("Description :", "");
|
.InnerText.Replace("Description :", "");
|
||||||
while (description.StartsWith('\n'))
|
while (description.StartsWith('\n'))
|
||||||
description = description.Substring(1);
|
description = description.Substring(1);
|
||||||
|
|
||||||
string pattern = "MMM dd,yyyy HH:mm";
|
|
||||||
|
|
||||||
HtmlNode oldestChapter = document.DocumentNode
|
string yearString = document.DocumentNode.Descendants("li").Last(li => li.HasClass("a-h")).Descendants("span")
|
||||||
.SelectNodes("//chapter-time[contains(concat(' ',normalize-space(@class),' '),' chapter-time ')]").MaxBy(
|
.First(s => s.HasClass("chapter-time")).InnerText;
|
||||||
node => DateTime.ParseExact(node.GetAttributeValue("title", "Dec 31 2400, 23:59"), pattern,
|
int year = Convert.ToInt32(yearString.Split(',')[^1]) + 2000;
|
||||||
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