[fanleaks] remove module

DNS record of fanleaks.club no longer exists
This commit is contained in:
Mike Fährmann
2025-01-26 16:35:46 +01:00
parent 98c068a379
commit b271a874ed
4 changed files with 0 additions and 161 deletions

View File

@@ -247,12 +247,6 @@ Consider all listed sites to potentially be NSFW.
<td>Photos, Profiles, Sets, Videos</td>
<td><a href="https://github.com/mikf/gallery-dl#cookies">Cookies</a></td>
</tr>
<tr>
<td>Fanleaks</td>
<td>https://fanleaks.club/</td>
<td>Models, Posts</td>
<td></td>
</tr>
<tr>
<td>Fantia</td>
<td>https://fantia.jp/</td>

View File

@@ -51,7 +51,6 @@ modules = [
"exhentai",
"facebook",
"fanbox",
"fanleaks",
"fantia",
"fapello",
"fapachi",

View File

@@ -1,87 +0,0 @@
# -*- coding: utf-8 -*-
# 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
# published by the Free Software Foundation.
"""Extractors for https://fanleaks.club/"""
from .common import Extractor, Message
from .. import text
class FanleaksExtractor(Extractor):
"""Base class for Fanleaks extractors"""
category = "fanleaks"
directory_fmt = ("{category}", "{model}")
filename_fmt = "{model_id}_{id}.{extension}"
archive_fmt = "{model_id}_{id}"
root = "https://fanleaks.club"
def __init__(self, match):
Extractor.__init__(self, match)
self.model_id = match.group(1)
def extract_post(self, url):
extr = text.extract_from(self.request(url, notfound="post").text)
data = {
"model_id": self.model_id,
"model" : text.unescape(extr('text-lg">', "</a>")),
"id" : text.parse_int(self.id),
"type" : extr('type="', '"')[:5] or "photo",
}
url = extr('src="', '"')
yield Message.Directory, data
yield Message.Url, url, text.nameext_from_url(url, data)
class FanleaksPostExtractor(FanleaksExtractor):
"""Extractor for individual posts on fanleaks.club"""
subcategory = "post"
pattern = r"(?:https?://)?(?:www\.)?fanleaks\.club/([^/?#]+)/(\d+)"
example = "https://fanleaks.club/MODEL/12345"
def __init__(self, match):
FanleaksExtractor.__init__(self, match)
self.id = match.group(2)
def items(self):
url = "{}/{}/{}".format(self.root, self.model_id, self.id)
return self.extract_post(url)
class FanleaksModelExtractor(FanleaksExtractor):
"""Extractor for all posts from a fanleaks model"""
subcategory = "model"
pattern = (r"(?:https?://)?(?:www\.)?fanleaks\.club"
r"/(?!latest/?$)([^/?#]+)/?$")
example = "https://fanleaks.club/MODEL"
def items(self):
page_num = 1
page = self.request(
self.root + "/" + self.model_id, notfound="model").text
data = {
"model_id": self.model_id,
"model" : text.unescape(text.extr(page, 'mt-4">', "</h1>")),
"type" : "photo",
}
page_url = text.extr(page, "url: '", "'")
while True:
page = self.request("{}{}".format(page_url, page_num)).text
if not page:
return
for item in text.extract_iter(page, '<a href="/', "</a>"):
self.id = id = text.extr(item, "/", '"')
if "/icon-play.svg" in item:
url = "{}/{}/{}".format(self.root, self.model_id, id)
yield from self.extract_post(url)
continue
data["id"] = text.parse_int(id)
url = text.extr(item, 'src="', '"').replace(
"/thumbs/", "/", 1)
yield Message.Directory, data
yield Message.Url, url, text.nameext_from_url(url, data)
page_num += 1

View File

@@ -1,67 +0,0 @@
# -*- coding: utf-8 -*-
# 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
# published by the Free Software Foundation.
from gallery_dl.extractor import fanleaks
from gallery_dl import exception
__tests__ = (
{
"#url" : "https://fanleaks.club/selti/880",
"#category": ("", "fanleaks", "post"),
"#class" : fanleaks.FanleaksPostExtractor,
"#pattern" : r"https://fanleaks\.club//models/selti/images/selti_0880\.jpg",
"model_id": "selti",
"model" : "Selti",
"id" : 880,
"type" : "photo",
},
{
"#url" : "https://fanleaks.club/daisy-keech/1038",
"#category": ("", "fanleaks", "post"),
"#class" : fanleaks.FanleaksPostExtractor,
"#pattern" : r"https://fanleaks\.club//models/daisy-keech/videos/daisy-keech_1038\.mp4",
"model_id": "daisy-keech",
"model" : "Daisy Keech",
"id" : 1038,
"type" : "video",
},
{
"#url" : "https://fanleaks.club/hannahowo/000",
"#category": ("", "fanleaks", "post"),
"#class" : fanleaks.FanleaksPostExtractor,
"#exception": exception.NotFoundError,
},
{
"#url" : "https://fanleaks.club/hannahowo",
"#category": ("", "fanleaks", "model"),
"#class" : fanleaks.FanleaksModelExtractor,
"#pattern" : r"https://fanleaks\.club//models/hannahowo/(images|videos)/hannahowo_\d+\.\w+",
"#range" : "1-100",
"#count" : 100,
},
{
"#url" : "https://fanleaks.club/belle-delphine",
"#category": ("", "fanleaks", "model"),
"#class" : fanleaks.FanleaksModelExtractor,
"#pattern" : r"https://fanleaks\.club//models/belle-delphine/(images|videos)/belle-delphine_\d+\.\w+",
"#range" : "1-100",
"#count" : 100,
},
{
"#url" : "https://fanleaks.club/daisy-keech",
"#category": ("", "fanleaks", "model"),
"#class" : fanleaks.FanleaksModelExtractor,
},
)