Skip to content

Commit

Permalink
[komikcast] update domain to 'komikcast.lol' (#5027)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 6, 2024
1 parent a441249 commit 8e1a2b5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ Consider all listed sites to potentially be NSFW.
</tr>
<tr>
<td>Komikcast</td>
<td>https://komikcast.site/</td>
<td>https://komikcast.lol/</td>
<td>Chapters, Manga</td>
<td></td>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions gallery_dl/extractor/komikcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

"""Extractors for https://komikcast.site/"""
"""Extractors for https://komikcast.lol/"""

from .common import ChapterExtractor, MangaExtractor
from .. import text
import re

BASE_PATTERN = r"(?:https?://)?(?:www\.)?komikcast\.(?:site|me|com)"
BASE_PATTERN = r"(?:https?://)?(?:www\.)?komikcast\.(?:lol|site|me|com)"


class KomikcastBase():
"""Base class for komikcast extractors"""
category = "komikcast"
root = "https://komikcast.site"
root = "https://komikcast.lol"

@staticmethod
def parse_chapter_string(chapter_string, data=None):
Expand Down Expand Up @@ -46,9 +46,9 @@ def parse_chapter_string(chapter_string, data=None):


class KomikcastChapterExtractor(KomikcastBase, ChapterExtractor):
"""Extractor for manga-chapters from komikcast.site"""
"""Extractor for manga-chapters from komikcast.lol"""
pattern = BASE_PATTERN + r"(/chapter/[^/?#]+/)"
example = "https://komikcast.site/chapter/TITLE/"
example = "https://komikcast.lol/chapter/TITLE/"

def metadata(self, page):
info = text.extr(page, "<title>", " - Komikcast<")
Expand All @@ -65,10 +65,10 @@ def images(page):


class KomikcastMangaExtractor(KomikcastBase, MangaExtractor):
"""Extractor for manga from komikcast.site"""
"""Extractor for manga from komikcast.lol"""
chapterclass = KomikcastChapterExtractor
pattern = BASE_PATTERN + r"(/(?:komik/)?[^/?#]+)/?$"
example = "https://komikcast.site/komik/TITLE"
example = "https://komikcast.lol/komik/TITLE"

def chapters(self, page):
results = []
Expand Down
35 changes: 32 additions & 3 deletions test/results/komikcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,48 @@


__tests__ = (
{
"#url" : "https://komikcast.lol/chapter/apotheosis-chapter-02-2-bahasa-indonesia/",
"#category": ("", "komikcast", "chapter"),
"#class" : komikcast.KomikcastChapterExtractor,
"#pattern" : r"https://svr\d+\.imgkc\d+\.my\.id/wp-content/img/A/Apotheosis/002-2/\d{3}\.jpg",
"#count" : 18,

"chapter" : 2,
"chapter_minor": ".2",
"count" : 18,
"extension": "jpg",
"filename" : r"re:0\d{2}",
"lang" : "id",
"language" : "Indonesian",
"manga" : "Apotheosis",
"page" : range(1, 18),
"title" : "",
},

{
"#url" : "https://komikcast.site/chapter/apotheosis-chapter-02-2-bahasa-indonesia/",
"#category": ("", "komikcast", "chapter"),
"#class" : komikcast.KomikcastChapterExtractor,
"#sha1_url" : "f6b43fbc027697749b3ea1c14931c83f878d7936",
"#sha1_metadata": "f3938e1aff9ad1f302f52447e9781b21f6da26d4",
},

{
"#url" : "https://komikcast.me/chapter/apotheosis-chapter-02-2-bahasa-indonesia/",
"#category": ("", "komikcast", "chapter"),
"#class" : komikcast.KomikcastChapterExtractor,
},

{
"#url" : "https://komikcast.com/chapter/apotheosis-chapter-02-2-bahasa-indonesia/",
"#category": ("", "komikcast", "chapter"),
"#class" : komikcast.KomikcastChapterExtractor,
},

{
"#url" : "https://komikcast.me/chapter/soul-land-ii-chapter-300-1-bahasa-indonesia/",
"#category": ("", "komikcast", "chapter"),
"#class" : komikcast.KomikcastChapterExtractor,
"#sha1_url" : "efd00a9bd95461272d51990d7bc54b79ff3ff2e6",
"#sha1_url" : "f2674e31b41a7f009f2f292652be2aefb6612d3f",
"#sha1_metadata": "cb646cfed3d45105bd645ab38b2e9f7d8c436436",
},

Expand Down

0 comments on commit 8e1a2b5

Please sign in to comment.