diff options
| author | 2026-01-06 04:25:00 -0500 | |
|---|---|---|
| committer | 2026-01-06 04:25:00 -0500 | |
| commit | 77589574c157fbf651dd251079cd02f6e282e623 (patch) | |
| tree | 3765f27e6b5fe6c5050fa952347c686021718606 /gallery_dl/extractor/yourlesbians.py | |
| parent | d4b96bc46d493f54e12c06d98115fccaab1b7ed2 (diff) | |
| parent | 385e4bfb1e426d23417ac788a6f44d639e226c89 (diff) | |
Update upstream source from tag 'upstream/1.31.2'
Update to upstream version '1.31.2'
with Debian dir 4ebe0ca706fc53eceb778881b680572ca5a0231c
Diffstat (limited to 'gallery_dl/extractor/yourlesbians.py')
| -rw-r--r-- | gallery_dl/extractor/yourlesbians.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gallery_dl/extractor/yourlesbians.py b/gallery_dl/extractor/yourlesbians.py new file mode 100644 index 0000000..5e14f6e --- /dev/null +++ b/gallery_dl/extractor/yourlesbians.py @@ -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 |
