1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 11:41:35 +01:00

[manganelo] fix extraction & recognize '.to' TLDs (#5005)

This commit is contained in:
Mike Fährmann 2024-01-01 22:05:21 +01:00
parent 63f649cd92
commit 516c69297d
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -10,7 +10,11 @@ from .common import ChapterExtractor, MangaExtractor
from .. import text from .. import text
import re import re
BASE_PATTERN = r"(?:https?://)?((?:chap|read|www\.|m\.)?mangan(?:at|el)o\.com)" BASE_PATTERN = (
r"(?:https?://)?"
r"((?:chap|read|www\.|m\.)?mangan(?:at|el)o"
r"\.(?:to|com))"
)
class ManganeloBase(): class ManganeloBase():
@ -67,10 +71,11 @@ class ManganeloChapterExtractor(ManganeloBase, ChapterExtractor):
def images(self, page): def images(self, page):
page = text.extr( page = text.extr(
page, 'class="container-chapter-reader', '\n<div') page, 'class="container-chapter-reader', 'class="container')
return [ return [
(url, None) (url, None)
for url in text.extract_iter(page, '<img src="', '"') for url in text.extract_iter(page, '<img src="', '"')
if not url.endswith("/gohome.png")
] or [ ] or [
(url, None) (url, None)
for url in text.extract_iter( for url in text.extract_iter(