[manganelo:manga] extract more metadata
- date_updated - status - tags
This commit is contained in:
@@ -94,8 +94,14 @@ class ManganeloMangaExtractor(ManganeloExtractor, MangaExtractor):
|
||||
self.manga_url = self.root + self.groups[-1]
|
||||
|
||||
def chapters(self, page):
|
||||
manga = text.unescape(text.extr(page, "<h1>", "<"))
|
||||
author = text.remove_html(text.extr(page, "<li>Author(s) :", "</a>"))
|
||||
extr = text.extract_from(page)
|
||||
|
||||
manga = text.unescape(extr("<h1>", "<"))
|
||||
author = text.remove_html(extr("<li>Author(s) :", "</a>"))
|
||||
status = extr("<li>Status :", "<").strip()
|
||||
update = text.parse_datetime(extr(
|
||||
"<li>Last updated :", "<").strip(), "%b-%d-%Y %I:%M:%S %p")
|
||||
tags = text.split_html(extr(">Genres :", "</li>"))[::2]
|
||||
|
||||
results = []
|
||||
for chapter in text.extract_iter(page, '<div class="row">', '</div>'):
|
||||
@@ -109,6 +115,9 @@ class ManganeloMangaExtractor(ManganeloExtractor, MangaExtractor):
|
||||
results.append((url, {
|
||||
"manga" : manga,
|
||||
"author" : author,
|
||||
"status" : status,
|
||||
"tags" : tags,
|
||||
"date_updated": update,
|
||||
"chapter" : text.parse_int(chapter),
|
||||
"chapter_minor": (sep and ".") + minor,
|
||||
"title" : title.partition(": ")[2],
|
||||
|
||||
@@ -48,10 +48,20 @@ __tests__ = (
|
||||
"chapter" : range(1, 60),
|
||||
"chapter_minor": {"", ".1", ".2", ".5"},
|
||||
"date" : "type:datetime",
|
||||
"date_updated": "dt:2024-10-30 10:20:58",
|
||||
"lang" : "en",
|
||||
"language": "English",
|
||||
"manga" : "Aria",
|
||||
"status" : "Completed",
|
||||
"title" : "",
|
||||
"tags": [
|
||||
"Adventure",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Sci fi",
|
||||
"Shounen",
|
||||
"Slice of life",
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -48,10 +48,20 @@ __tests__ = (
|
||||
"chapter" : range(1, 60),
|
||||
"chapter_minor": {"", ".1", ".2", ".5"},
|
||||
"date" : "type:datetime",
|
||||
"date_updated": "dt:2024-10-30 10:20:58",
|
||||
"lang" : "en",
|
||||
"language": "English",
|
||||
"manga" : "Aria",
|
||||
"status" : "Completed",
|
||||
"title" : "",
|
||||
"tags": [
|
||||
"Adventure",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Sci fi",
|
||||
"Shounen",
|
||||
"Slice of life",
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -48,10 +48,20 @@ __tests__ = (
|
||||
"chapter" : range(1, 60),
|
||||
"chapter_minor": {"", ".1", ".2", ".5"},
|
||||
"date" : "type:datetime",
|
||||
"date_updated": "dt:2024-10-30 17:20:58",
|
||||
"lang" : "en",
|
||||
"language": "English",
|
||||
"manga" : "Aria",
|
||||
"status" : "Completed",
|
||||
"title" : "",
|
||||
"tags": [
|
||||
"Adventure",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Sci fi",
|
||||
"Shounen",
|
||||
"Slice of life",
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -48,10 +48,20 @@ __tests__ = (
|
||||
"chapter" : range(1, 60),
|
||||
"chapter_minor": {"", ".1", ".2", ".5"},
|
||||
"date" : "type:datetime",
|
||||
"date_updated": "dt:2024-10-30 17:20:58",
|
||||
"lang" : "en",
|
||||
"language": "English",
|
||||
"manga" : "Aria",
|
||||
"status" : "Completed",
|
||||
"title" : "",
|
||||
"tags": [
|
||||
"Adventure",
|
||||
"Comedy",
|
||||
"Drama",
|
||||
"Sci fi",
|
||||
"Shounen",
|
||||
"Slice of life",
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user