[8muses] support 'comics.8muses.com' URLs

This commit is contained in:
Mike Fährmann 2020-07-05 19:03:02 +02:00
parent 4d8b3e4f70
commit c28db7a6ea
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 12 deletions

View File

@ -11,7 +11,7 @@ Site URL Capabilities
4plebs https://archive.4plebs.org/ Threads 4plebs https://archive.4plebs.org/ Threads
500px https://500px.com/ Galleries, individual Images, User Profiles 500px https://500px.com/ Galleries, individual Images, User Profiles
8kun https://8kun.top/ Boards, Threads 8kun https://8kun.top/ Boards, Threads
8muses https://www.8muses.com/ Albums 8muses https://comics.8muses.com/ Albums
Adobe Portfolio https://www.myportfolio.com/ Galleries Adobe Portfolio https://www.myportfolio.com/ Galleries
Adult Empire https://www.adultempire.com/ Galleries Adult Empire https://www.adultempire.com/ Galleries
arch.b4k.co https://arch.b4k.co/ Threads arch.b4k.co https://arch.b4k.co/ Threads

View File

@ -6,7 +6,7 @@
# 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
# published by the Free Software Foundation. # published by the Free Software Foundation.
"""Extractors for https://www.8muses.com/""" """Extractors for https://comics.8muses.com/"""
from .common import Extractor, Message from .common import Extractor, Message
from .. import text from .. import text
@ -14,30 +14,31 @@ import json
class _8musesAlbumExtractor(Extractor): class _8musesAlbumExtractor(Extractor):
"""Extractor for image albums on www.8muses.com""" """Extractor for image albums on comics.8muses.com"""
category = "8muses" category = "8muses"
subcategory = "album" subcategory = "album"
directory_fmt = ("{category}", "{album[path]}") directory_fmt = ("{category}", "{album[path]}")
filename_fmt = "{page:>03}.{extension}" filename_fmt = "{page:>03}.{extension}"
archive_fmt = "{hash}" archive_fmt = "{hash}"
root = "https://www.8muses.com" root = "https://comics.8muses.com"
pattern = (r"(?:https?://)?(?:www\.)?8muses\.com" pattern = (r"(?:https?://)?(?:comics\.|www\.)?8muses\.com"
r"(/comics/album/[^?&#]+)(\?[^#]+)?") r"(/comics/album/[^?&#]+)(\?[^#]+)?")
test = ( test = (
("https://www.8muses.com/comics/album/Fakku-Comics/santa/Im-Sorry", { ("https://comics.8muses.com/comics/album/Fakku-Comics/mogg/Liar", {
"url": "82449d6a26a29204695cba5d52c3ec60170bc159", "url": "6286ac33087c236c5a7e51f8a9d4e4d5548212d4",
"pattern": r"https://comics.8muses.com/image/fl/[\w-]+",
"keyword": { "keyword": {
"url" : str, "url" : str,
"hash" : str, "hash" : str,
"page" : int, "page" : int,
"count": 16, "count": 6,
"album": { "album": {
"id" : 10457, "id" : 10467,
"title" : "Im Sorry", "title" : "Liar",
"path" : "Fakku Comics/santa/Im Sorry", "path" : "Fakku Comics/mogg/Liar",
"private": False, "private": False,
"url" : str, "url" : str,
"parent" : 10454, "parent" : 10464,
"views" : int, "views" : int,
"likes" : int, "likes" : int,
"date" : "dt:2018-07-10 00:00:00", "date" : "dt:2018-07-10 00:00:00",