mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-12 07:58:21 +02:00
Merge pull request #375 from TheyCallMeTravis/webtoons-search_regex_fix
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
webtoons - fix search regex
This commit is contained in:
commit
bdff5b7aec
@ -56,7 +56,7 @@ public class Webtoons : MangaConnector
|
|||||||
Log($"Failed to retrieve site");
|
Log($"Failed to retrieve site");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Regex regex = new Regex(@".*webtoons\.com/en/(?<category>[^/]+)/(?<title>[^/]+)/list\?title_no=(?<id>\d+).*");
|
Regex regex = new Regex(@".*webtoons\.com\/en\/(?<category>[^\/]+)\/(?<title>[^\/]+)\/list\?title_no=(?<id>\d+).*");
|
||||||
Match match = regex.Match(url);
|
Match match = regex.Match(url);
|
||||||
|
|
||||||
if(match.Success) {
|
if(match.Success) {
|
||||||
@ -110,7 +110,7 @@ public class Webtoons : MangaConnector
|
|||||||
|
|
||||||
HtmlNode posterNode = document.DocumentNode.SelectSingleNode("//div[contains(@class, 'detail_body') and contains(@class, 'banner')]");
|
HtmlNode posterNode = document.DocumentNode.SelectSingleNode("//div[contains(@class, 'detail_body') and contains(@class, 'banner')]");
|
||||||
|
|
||||||
Regex regex = new Regex(@"url\((?<url>.*?)\)");
|
Regex regex = new Regex(@"url\('(?<url>.*?)'\)");
|
||||||
Match match = regex.Match(posterNode.GetAttributeValue("style", ""));
|
Match match = regex.Match(posterNode.GetAttributeValue("style", ""));
|
||||||
|
|
||||||
string posterUrl = match.Groups["url"].Value;
|
string posterUrl = match.Groups["url"].Value;
|
||||||
@ -270,4 +270,4 @@ internal class PublicationManager {
|
|||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string Category { get; set; }
|
public string Category { get; set; }
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user