Skip to content

Commit

Permalink
[sankakucomplex] update domain to 'news.sankakucomplex.com'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jul 26, 2024
1 parent f321272 commit b5e141e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/supportedsites.md
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ Consider all listed sites to potentially be NSFW.
</tr>
<tr>
<td>Sankaku Complex</td>
<td>https://www.sankakucomplex.com/</td>
<td>https://news.sankakucomplex.com/</td>
<td>Articles, Tag Searches</td>
<td></td>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions gallery_dl/extractor/sankakucomplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

"""Extractors for https://www.sankakucomplex.com/"""
"""Extractors for https://news.sankakucomplex.com/"""

from .common import Extractor, Message
from .. import text, util
Expand All @@ -16,22 +16,22 @@
class SankakucomplexExtractor(Extractor):
"""Base class for sankakucomplex extractors"""
category = "sankakucomplex"
root = "https://www.sankakucomplex.com"
root = "https://news.sankakucomplex.com"

def __init__(self, match):
Extractor.__init__(self, match)
self.path = match.group(1)


class SankakucomplexArticleExtractor(SankakucomplexExtractor):
"""Extractor for articles on www.sankakucomplex.com"""
"""Extractor for articles on news.sankakucomplex.com"""
subcategory = "article"
directory_fmt = ("{category}", "{date:%Y-%m-%d} {title}")
filename_fmt = "{filename}.{extension}"
archive_fmt = "{date:%Y%m%d}_{filename}"
pattern = (r"(?:https?://)?www\.sankakucomplex\.com"
pattern = (r"(?:https?://)?(?:news|www)\.sankakucomplex\.com"
r"/(\d\d\d\d/\d\d/\d\d/[^/?#]+)")
example = "https://www.sankakucomplex.com/1970/01/01/TITLE"
example = "https://news.sankakucomplex.com/1970/01/01/TITLE"

def items(self):
url = "{}/{}/?pg=X".format(self.root, self.path)
Expand Down Expand Up @@ -87,9 +87,9 @@ def _extract_embeds(content):
class SankakucomplexTagExtractor(SankakucomplexExtractor):
"""Extractor for sankakucomplex blog articles by tag or author"""
subcategory = "tag"
pattern = (r"(?:https?://)?www\.sankakucomplex\.com"
pattern = (r"(?:https?://)?(?:news|www)\.sankakucomplex\.com"
r"/((?:tag|category|author)/[^/?#]+)")
example = "https://www.sankakucomplex.com/tag/TAG/"
example = "https://news.sankakucomplex.com/tag/TAG/"

def items(self):
pnum = 1
Expand Down
10 changes: 5 additions & 5 deletions test/results/sankakucomplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@

__tests__ = (
{
"#url" : "https://www.sankakucomplex.com/2019/05/11/twitter-cosplayers",
"#url" : "https://news.sankakucomplex.com/2019/05/11/twitter-cosplayers",
"#category": ("", "sankakucomplex", "article"),
"#class" : sankakucomplex.SankakucomplexArticleExtractor,
"#sha1_url" : "4a9ecc5ae917fbce469280da5b6a482510cae84d",
"#sha1_metadata": "bfe08310e7d9a572f568f6900e0ed0eb295aa2b3",
"#pattern" : r"https://news\.sankakucomplex\.com/wp-content/uploads/2019/05/maid-day-cosplay-\d+\.jpg",
"#sha1_metadata": "21bf106150913a1398860031f06d6e1e6423e518",
},

{
"#url" : "https://www.sankakucomplex.com/2009/12/01/sexy-goddesses-of-2ch",
"#category": ("", "sankakucomplex", "article"),
"#class" : sankakucomplex.SankakucomplexArticleExtractor,
"#sha1_url" : "a1e249173fd6c899a8134fcfbd9c925588a63f7c",
"#sha1_metadata": "e78fcc23c2711befc0969a45ea5082a29efccf68",
"#pattern" : r"https://news\.sankakucomplex\.com/wp-content/uploads/2009/12/Goddesses-of-2ch-amateur-internet-idol-\d+\.jpe?g",
"#sha1_metadata": "651e4ee79ecab1771b43df467b5ab32249d69b2a",
},

{
Expand Down

0 comments on commit b5e141e

Please sign in to comment.