[yourlesbians] add 'album' extractor (#8713)

This commit is contained in:
Mike Fährmann
2025-12-30 20:33:50 +01:00
parent a97c320a38
commit 51c155df94
5 changed files with 110 additions and 0 deletions

View File

@@ -1279,6 +1279,12 @@ Consider all listed sites to potentially be NSFW.
<td>Playlists, Posts, Tag Searches</td>
<td></td>
</tr>
<tr id="yourlesbians" title="yourlesbians">
<td>YourLesbians</td>
<td>https://yourlesbians.com/</td>
<td>Albums</td>
<td></td>
</tr>
<tr id="zerochan" title="zerochan">
<td>Zerochan</td>
<td>https://www.zerochan.net/</td>

View File

@@ -243,6 +243,7 @@ modules = [
"xhamster",
"xvideos",
"yiffverse",
"yourlesbians",
"zerochan",
"booru",
"moebooru",

View File

@@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
# Copyright 2025 Mike Fährmann
#
# 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://yourlesbians.com/"""
from .common import GalleryExtractor
from .. import text
BASE_PATTERN = r"(?:https?://)?(?:www\.)?yourlesbians\.com"
class YourlesbiansAlbumExtractor(GalleryExtractor):
category = "yourlesbians"
subcategory = "album"
root = "https://yourlesbians.com"
directory_fmt = ("{category}", "{title}")
filename_fmt = "{num:>03} {filename}.{extension}"
archive_fmt = "{title}/{num}"
pattern = BASE_PATTERN + r"(/album/([^/?#]+)/?)"
example = "https://yourlesbians.com/album/SLUG/"
def metadata(self, page):
extr = text.extract_from(page)
data = {
"album_url": extr('property="og:url" content="', '"'),
"title": text.unescape(extr(
'property="og:title" content="', '"')[:-8].rstrip()),
"album_thumbnail": extr('property="og:image" content="', '"'),
"description": extr('property="og:description" content="', '"'),
"tags": text.split_html(extr('tags-row', '</div>'))[1:],
}
if data["description"].endswith(", right after."):
data["description"] = ""
self.album = extr('class="album-inner', "</div>")
return data
def images(self, _):
results = []
for url in text.extract_iter(self.album, '<a href="', '"'):
fn, _, ext = url.rsplit("/", 2)[1].rpartition(".")
results.append((url, {
"filename" : fn,
"extension": ext,
}))
return results

View File

@@ -218,6 +218,7 @@ CATEGORY_MAP = {
"xvideos" : "XVideos",
"yandere" : "yande.re",
"yiffverse" : "Yiff verse",
"yourlesbians" : "YourLesbians",
}
SUBCATEGORY_MAP = {

View File

@@ -0,0 +1,52 @@
# -*- 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 yourlesbians
__tests__ = (
{
"#url" : "https://yourlesbians.com/album/lana-rhoades-nude/",
"#class" : yourlesbians.YourlesbiansAlbumExtractor,
"#pattern" : r"https://yourlesbians\.com/get_image/2/\w+/sources/\d/\d/\d+\.jpg/\?i\-acctoken=\w+",
"#count" : 30,
"album_thumbnail": "https://www.yourlesbians.com/contents/albums/preview/480x640/0/2/preview.jpg",
"album_url" : "https://yourlesbians.com/album/lana-rhoades-nude/",
"count" : 30,
"num" : range(1, 30),
"description" : "Lana Rhoades porn actress, born Amara Lynee Maple on September 6, 1996, in McHenry, Illinois, was a cheerleader and gymnast raised by a single mom of Slovenian-Czech descent. After waitressing at Tilted Kilt and Hooters, she answered a 2016 Craigslist ad, shot her first scene with FTV Girls at 19, then signed with Spiegler Girls and moved to LA. Exploding into over 300 titles for Blacked, Tushy, Vixen, Brazzers, Evil Angel and more, she became legendary for anal, gangbangs, interracial, and showcases like Lana and Ultimate Fuck Toy: Lana Rhoades, cementing her as an all-time superstar.",
"extension" : "jpg",
"filename" : r"re:\d+",
"tags" : ["lana rhoades ass"],
"title" : "Lana Rhoades Nude",
},
{
"#url" : "https://yourlesbians.com/album/splatxo-nude/",
"#class" : yourlesbians.YourlesbiansAlbumExtractor,
"#results" : (
"https://yourlesbians.com/get_image/2/592e928637aadc3a6c96c03a4775ff3b/sources/0/189/4101.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/8b89201a5618af434079cbdaa72a4af1/sources/0/189/4102.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/c14f64d23ddbe9a918a9794f0660dca0/sources/0/189/4103.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/740eda0ee59b3f66b96e5a3f6359fc4a/sources/0/189/4104.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/9c83001c16963a0cab10f3d715eb8ea2/sources/0/189/4105.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/ae3de334429a294d7aba755a21781b29/sources/0/189/4106.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
"https://yourlesbians.com/get_image/2/6d816e8de589ac963cae844a492c4b63/sources/0/189/4107.jpg/?i-acctoken=MXw0N2I3MDhlMjMzNjNkMTgxNGZkNzc2NThlNDQ3ZThjYg",
),
"album_thumbnail": "https://www.yourlesbians.com/contents/albums/preview/480x640/0/189/preview.jpg",
"album_url" : "https://yourlesbians.com/album/splatxo-nude/",
"count" : 7,
"num" : range(1, 7),
"description" : "",
"extension" : "jpg",
"filename" : str,
"tags" : [],
"title" : "SplatXo Nude",
},
)