[weebdex] add 'data-saver' option (#8914)
This commit is contained in:
@@ -6936,6 +6936,16 @@ Description
|
|||||||
Useful for creating CBZ archives with actual source thumbnails.
|
Useful for creating CBZ archives with actual source thumbnails.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.weebdex.data-saver
|
||||||
|
----------------------------
|
||||||
|
Type
|
||||||
|
``bool``
|
||||||
|
Default
|
||||||
|
``false``
|
||||||
|
Description
|
||||||
|
Enable `Data Saver` mode and download lower quality versions of chapters.
|
||||||
|
|
||||||
|
|
||||||
extractor.weibo.gifs
|
extractor.weibo.gifs
|
||||||
--------------------
|
--------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -963,6 +963,10 @@
|
|||||||
{
|
{
|
||||||
"sleep-request": "0.5-1.5"
|
"sleep-request": "0.5-1.5"
|
||||||
},
|
},
|
||||||
|
"weebdex":
|
||||||
|
{
|
||||||
|
"data-saver": false
|
||||||
|
},
|
||||||
"weibo":
|
"weibo":
|
||||||
{
|
{
|
||||||
"sleep-request": "1.0-2.0",
|
"sleep-request": "1.0-2.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2025 Mike Fährmann
|
# Copyright 2025-2026 Mike Fährmann
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -65,12 +65,20 @@ class WeebdexChapterExtractor(WeebdexBase, ChapterExtractor):
|
|||||||
data = self.data
|
data = self.data
|
||||||
base = f"{data['node']}/data/{data['id']}/"
|
base = f"{data['node']}/data/{data['id']}/"
|
||||||
|
|
||||||
|
if self.config("data-saver", False):
|
||||||
|
pages = data["data_optimized"]
|
||||||
|
original = False
|
||||||
|
else:
|
||||||
|
pages = data["data"]
|
||||||
|
original = True
|
||||||
|
|
||||||
return [
|
return [
|
||||||
(base + page["name"], {
|
(base + page["name"], {
|
||||||
"width" : page["dimensions"][0],
|
"width" : page["dimensions"][0],
|
||||||
"height": page["dimensions"][1],
|
"height": page["dimensions"][1],
|
||||||
|
"original": original,
|
||||||
})
|
})
|
||||||
for page in data["data"]
|
for page in pages
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ __tests__ = (
|
|||||||
{
|
{
|
||||||
"#url" : "https://weebdex.org/chapter/f6c0awnrba",
|
"#url" : "https://weebdex.org/chapter/f6c0awnrba",
|
||||||
"#class" : weebdex.WeebdexChapterExtractor,
|
"#class" : weebdex.WeebdexChapterExtractor,
|
||||||
"#pattern" : r"https://s\d+\.notdelta\.xyz/data/f6c0awnrba/\d+-\w{64}\.png",
|
"#pattern" : r"https://s\d+\.weebdex\.net/data/f6c0awnrba/\d+-\w{64}\.png",
|
||||||
"#count" : 14,
|
"#count" : 14,
|
||||||
|
|
||||||
"artist" : ["Nokomi (のこみ)"],
|
"artist" : ["Nokomi (のこみ)"],
|
||||||
@@ -66,7 +66,7 @@ ___
|
|||||||
{
|
{
|
||||||
"#url" : "https://weebdex.org/chapter/itizot1rxc",
|
"#url" : "https://weebdex.org/chapter/itizot1rxc",
|
||||||
"#class" : weebdex.WeebdexChapterExtractor,
|
"#class" : weebdex.WeebdexChapterExtractor,
|
||||||
"#pattern" : r"https://s\d+\.notdelta\.xyz/data/itizot1rxc/\d+\-\w+\.jpg",
|
"#pattern" : r"https://s\d+\.weebdex\.net/data/itizot1rxc/\d+\-\w+\.jpg",
|
||||||
"#count" : 17,
|
"#count" : 17,
|
||||||
|
|
||||||
"artist" : ["Matsuda Minoru"],
|
"artist" : ["Matsuda Minoru"],
|
||||||
@@ -83,12 +83,25 @@ ___
|
|||||||
"manga_id" : "3o0icxno26",
|
"manga_id" : "3o0icxno26",
|
||||||
"origin" : "ja",
|
"origin" : "ja",
|
||||||
"title" : "Cuộc hẹn tại phía Đông vườn địa đàng",
|
"title" : "Cuộc hẹn tại phía Đông vườn địa đàng",
|
||||||
"uploader" : "sMrBjZf",
|
"uploader" : "wSwPTgL",
|
||||||
"version" : 1,
|
"version" : 1,
|
||||||
"volume" : 2,
|
"volume" : 2,
|
||||||
"year" : 2021,
|
"year" : 2021,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://weebdex.org/chapter/itizot1rxc",
|
||||||
|
"#comment" : "'data-saver' option (#8914)",
|
||||||
|
"#class" : weebdex.WeebdexChapterExtractor,
|
||||||
|
"#options" : {"data-saver": True},
|
||||||
|
"#range" : "1-3",
|
||||||
|
"#results" : (
|
||||||
|
"https://s11.weebdex.net/data/itizot1rxc/1-fa838df3d9b2d16ab3f900a5d74d8e1fe2b15446825978209053297b8e3f7d0d.webp",
|
||||||
|
"https://s11.weebdex.net/data/itizot1rxc/2-b4914436ab21e7915440024a5b5bd705c3a844df314c3c7d722388b3ce81626a.webp",
|
||||||
|
"https://s11.weebdex.net/data/itizot1rxc/3-6b0e1901cfae7d6d5c21769d714c992fb1fa1af6e9e8e10083ea5a6bf5d53cef.webp",
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://weebdex.org/title/3o0icxno26/ani-datta-mono",
|
"#url" : "https://weebdex.org/title/3o0icxno26/ani-datta-mono",
|
||||||
"#class" : weebdex.WeebdexMangaExtractor,
|
"#class" : weebdex.WeebdexMangaExtractor,
|
||||||
@@ -111,7 +124,7 @@ ___
|
|||||||
"manga_id" : "3o0icxno26",
|
"manga_id" : "3o0icxno26",
|
||||||
"origin" : "ja",
|
"origin" : "ja",
|
||||||
"status" : "ongoing",
|
"status" : "ongoing",
|
||||||
"version" : {1, 2},
|
"version" : {1, 2, 3, 4},
|
||||||
"year" : 2021,
|
"year" : 2021,
|
||||||
"description" : """\
|
"description" : """\
|
||||||
My brother died. When I went to visit my brother's grave with my brother's lover——……
|
My brother died. When I went to visit my brother's grave with my brother's lover——……
|
||||||
|
|||||||
Reference in New Issue
Block a user