[comick] add 'lang' option (#7938)
This commit is contained in:
@@ -1973,6 +1973,20 @@ Description
|
|||||||
`quality <extractor.civitai.quality_>`__ ones.
|
`quality <extractor.civitai.quality_>`__ ones.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.comick.lang
|
||||||
|
---------------------
|
||||||
|
Type
|
||||||
|
* ``string``
|
||||||
|
* ``list`` of ``strings``
|
||||||
|
Example
|
||||||
|
* ``"en"``
|
||||||
|
* ``"fr,it,pl"``
|
||||||
|
* ``["fr", "it", "pl"]``
|
||||||
|
Description
|
||||||
|
`ISO 639-1 <https://en.wikipedia.org/wiki/ISO_639-1>`__ language codes
|
||||||
|
to filter chapters by.
|
||||||
|
|
||||||
|
|
||||||
extractor.cyberdrop.domain
|
extractor.cyberdrop.domain
|
||||||
--------------------------
|
--------------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -211,6 +211,10 @@
|
|||||||
"quality" : "original=true",
|
"quality" : "original=true",
|
||||||
"quality-videos": "quality=100"
|
"quality-videos": "quality=100"
|
||||||
},
|
},
|
||||||
|
"comick":
|
||||||
|
{
|
||||||
|
"lang": ""
|
||||||
|
},
|
||||||
"coomer":
|
"coomer":
|
||||||
{
|
{
|
||||||
"username": "",
|
"username": "",
|
||||||
|
|||||||
@@ -160,8 +160,15 @@ class ComickMangaExtractor(ComickBase, MangaExtractor):
|
|||||||
"Sec-Fetch-Site": "same-site",
|
"Sec-Fetch-Site": "same-site",
|
||||||
}
|
}
|
||||||
|
|
||||||
query = text.parse_query(query)
|
query = text.parse_query_list(query, ("lang",))
|
||||||
params = {"lang": query.get("lang") or None}
|
|
||||||
|
if (lang := query.get("lang")) or (lang := self.config("lang")):
|
||||||
|
if not isinstance(lang, str):
|
||||||
|
lang = ",".join(lang)
|
||||||
|
else:
|
||||||
|
lang = None
|
||||||
|
|
||||||
|
params = {"lang": lang}
|
||||||
params["page"] = page = text.parse_int(query.get("page"), 1)
|
params["page"] = page = text.parse_int(query.get("page"), 1)
|
||||||
|
|
||||||
if date_order := query.get("date-order"):
|
if date_order := query.get("date-order"):
|
||||||
@@ -172,7 +179,7 @@ class ComickMangaExtractor(ComickBase, MangaExtractor):
|
|||||||
params["chap-order"] = \
|
params["chap-order"] = \
|
||||||
"0" if self.config("chapter-reverse", False) else "1"
|
"0" if self.config("chapter-reverse", False) else "1"
|
||||||
|
|
||||||
group = query.get("group", None)
|
group = query.get("group")
|
||||||
if group == "0":
|
if group == "0":
|
||||||
group = None
|
group = None
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ __tests__ = (
|
|||||||
"width" : 1424,
|
"width" : 1424,
|
||||||
"height" : 2000,
|
"height" : 2000,
|
||||||
"size" : range(67460, 276608),
|
"size" : range(67460, 276608),
|
||||||
"optimized": None,
|
"optimized": {int, None},
|
||||||
|
|
||||||
"volume": 1,
|
"volume": 1,
|
||||||
"chapter": 10,
|
"chapter": 10,
|
||||||
@@ -36,7 +36,7 @@ __tests__ = (
|
|||||||
"count": 5,
|
"count": 5,
|
||||||
"page" : range(1, 5),
|
"page" : range(1, 5),
|
||||||
"date": "dt:2025-06-21 13:07:32",
|
"date": "dt:2025-06-21 13:07:32",
|
||||||
"date_updated": "dt:2025-06-21 16:52:40",
|
"date_updated": "type:datetime",
|
||||||
"demographic": "Seinen",
|
"demographic": "Seinen",
|
||||||
"description": "Ever wondered what it would be like if your cat had to get a job? The cats in this book do every kind of occupation you can imagine, and they do it just the way they like. Feline chefs, dentists, wrestlers, detectives, opera singers and much more await in this hilarious full-color collection!",
|
"description": "Ever wondered what it would be like if your cat had to get a job? The cats in this book do every kind of occupation you can imagine, and they do it just the way they like. Feline chefs, dentists, wrestlers, detectives, opera singers and much more await in this hilarious full-color collection!",
|
||||||
"format": "Full Color",
|
"format": "Full Color",
|
||||||
@@ -49,7 +49,7 @@ __tests__ = (
|
|||||||
"origin": "ja",
|
"origin": "ja",
|
||||||
"published": 2023,
|
"published": 2023,
|
||||||
"publisher": (),
|
"publisher": (),
|
||||||
"rank": 29915,
|
"rank": range(29_000, 32_000),
|
||||||
"rating": "safe",
|
"rating": "safe",
|
||||||
"score": float,
|
"score": float,
|
||||||
"status": "Ongoing",
|
"status": "Ongoing",
|
||||||
@@ -94,9 +94,9 @@ __tests__ = (
|
|||||||
"chapter_string": "aPu5CgJA-chapter-3-vi",
|
"chapter_string": "aPu5CgJA-chapter-3-vi",
|
||||||
"count": 20,
|
"count": 20,
|
||||||
"date": "dt:2025-05-09 17:25:38",
|
"date": "dt:2025-05-09 17:25:38",
|
||||||
"date_updated": "dt:2025-06-21 18:25:55",
|
"date_updated": "type:datetime",
|
||||||
"demographic": "Seinen",
|
"demographic": "Seinen",
|
||||||
"description": "\"Hey, wanna do it?\"\n\nA romantic comedy about living together with a scarred \"Queen\" in a relationship that’s more than friends but less than lovers!!\n\nOne late night, Yamamoto, a college student working part-time at a convenience store, reunites with Hayashi Megumi, his high school classmate and the most beautiful girl in their class.\nKnown as the \"Queen\" for her strong-willed and arrogant personality, Yamamoto had always found her difficult to get along with. However, during a routine conversation, he notices painful bruises on her wrist.\nAfter learning that her boyfriend had been abusing her, Yamamoto decides to let Hayashi stay at his place...!?",
|
"description": str,
|
||||||
"format": "Adaptation",
|
"format": "Adaptation",
|
||||||
"genre": [
|
"genre": [
|
||||||
"Comedy",
|
"Comedy",
|
||||||
@@ -111,8 +111,8 @@ __tests__ = (
|
|||||||
"lang": "vi",
|
"lang": "vi",
|
||||||
"links": {
|
"links": {
|
||||||
"al" : "187656",
|
"al" : "187656",
|
||||||
"amz": "https://www.amazon.co.jp/-/en/dp/4088937163",
|
"amz": "https://www.amazon.co.jp/dp/B0F2SL834T",
|
||||||
"bw" : "series/520105/list",
|
"bw" : "series/520105",
|
||||||
"mal": "178605",
|
"mal": "178605",
|
||||||
"raw": "https://manga.nicovideo.jp/comic/71123",
|
"raw": "https://manga.nicovideo.jp/comic/71123",
|
||||||
},
|
},
|
||||||
@@ -120,21 +120,16 @@ __tests__ = (
|
|||||||
"manga_hid": "oeb0Dydj",
|
"manga_hid": "oeb0Dydj",
|
||||||
"manga_id": 114526,
|
"manga_id": 114526,
|
||||||
"manga_slug": "koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai",
|
"manga_slug": "koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai",
|
||||||
"manga_titles": [
|
"manga_titles": "len:list:4",
|
||||||
"Cuộc sống chung với nữ hoàng từng kiêu ngạo hồi cấp ba, không ngờ lại khá dễ chịu.",
|
"mature": True,
|
||||||
"高校時代に傲慢だった女王様との同棲生活は意外と居心地が悪くない",
|
|
||||||
"Koko Jidai Ni Gomandatta Jou Sama To No Dosei Seikatsu Ha Igaito Igokochi Ga Warukunai",
|
|
||||||
"Living together with the queen from my high school days who was arrogant, surprisingly isn't that uncomfortable",
|
|
||||||
],
|
|
||||||
"mature": False,
|
|
||||||
"origin": "ja",
|
"origin": "ja",
|
||||||
"published": 2025,
|
"published": 2025,
|
||||||
"publisher": (),
|
"publisher": ["Suiyoubi wa Mattari Dash X Comic"],
|
||||||
"rank": range(800, 1000),
|
"rank": range(100, 1000),
|
||||||
"rating": "safe",
|
"rating": "suggestive",
|
||||||
"score": float,
|
"score": float,
|
||||||
"status": "Ongoing",
|
"status": "Ongoing",
|
||||||
"tags" : (),
|
"tags" : list,
|
||||||
"theme": ["School Life"],
|
"theme": ["School Life"],
|
||||||
"title": "Yamamoto \"Đuổi\" Hayashi Đi Ư!?",
|
"title": "Yamamoto \"Đuổi\" Hayashi Đi Ư!?",
|
||||||
},
|
},
|
||||||
@@ -173,9 +168,26 @@ __tests__ = (
|
|||||||
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/rSROPoui-chapter-2-vi",
|
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/rSROPoui-chapter-2-vi",
|
||||||
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/aPu5CgJA-chapter-3-vi",
|
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/aPu5CgJA-chapter-3-vi",
|
||||||
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/eQ26SPqi-chapter-4-vi",
|
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/eQ26SPqi-chapter-4-vi",
|
||||||
|
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/nhtKNBiS-chapter-5-vi",
|
||||||
|
"https://comick.io/comic/koko-jidai-ni-gomandatta-jou-sama-to-no-dousei-seikatsu-wa-igaito-igokochi-ga-warukunai/1ukj8pOy-chapter-6-vi",
|
||||||
),
|
),
|
||||||
|
|
||||||
"lang": "vi",
|
"lang": "vi",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://comick.io/comic/kobayashi-san-chi-no-maid-dragon",
|
||||||
|
"#comment" : "'lang' option (#7938)",
|
||||||
|
"#class" : comick.ComickMangaExtractor,
|
||||||
|
"#options" : {"lang": ["fr", "id"]},
|
||||||
|
"#pattern" : comick.ComickChapterExtractor.pattern,
|
||||||
|
"#results" : (
|
||||||
|
"https://comick.io/comic/kobayashi-san-chi-no-maid-dragon/l0Mj1-chapter-1-id",
|
||||||
|
"https://comick.io/comic/kobayashi-san-chi-no-maid-dragon/xnkNn-chapter-1-fr",
|
||||||
|
"https://comick.io/comic/kobayashi-san-chi-no-maid-dragon/vw9Kn-chapter-2-id",
|
||||||
|
),
|
||||||
|
|
||||||
|
"lang": {"fr", "id"},
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user