* add new extractor for leakgallery.com
Added support for downloading photo and video posts from leakgallery.com.
Supports:
* Individual post URLs
* User profile URLs with pagination via AJAX
* Optional type/sort filters (e.g. /Photos/MostRecent)
* Proper file extension handling
* Creator-based folder structure
* Compatibility with --download-archive
Tested locally and functional, but may still need review or improvement.
* [leakgallery] add support
Added leakgallery to extractor module imports so it's recognized and used.
* [leakgallery] update extractor structure
- Refactored using LeakGalleryExtractorBase to remove duplication
- Moved init logic into items() using self.groups
- Replaced re with text.re as per upstream guidance
- Added creator fallback and media deduplication
- Aligned structure with gallery-dl maintainer review tips
* [leakgallery] add support
- Added leakgallery entry to supportedsites.md
- Includes post, user, trending, and most-liked subcategories
* add exported extractor results
* [leakgallery] fix flake8 style issues
Cleaned up code to comply with flake8 rules, especially:
- removed unused imports
- split long lines >79 chars
- ensured newline at EOF
No functional changes made; purely formatting to satisfy CI checks.
* [tests] update extractor results
* [leakgallery] fix flake8 style issues (part 2)
Fix remaining flake8 issues in leakgallery.py:
- Reformat line breaks to avoid W503 (line break before binary operator)
- Wrap long lines to respect E501 (line too long > 79 characters)
- Cleaned up exception logging for better clarity
- Confirmed all flake8 checks now pass successfully
This superseedes the previous commit which partially fixed formatting violations.
* [leakgallery] fix flake8 style issues (part 3)
* [leakgallery] rename extractor classes
* [tests] update extractor results
* [tests] rename extractor results
* [leakgallery] rename extractor classes (part 2)
* [leakgallery] rename example
* update docs/supportedsites
* update test results
and convert line endings to '\n'
* update
- convert line endings to '\n'
- use _pagination method
- fix logging calls
* return more metadata for _pagination() results
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
# -*- 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 leakgallery
|
|
FILE_PATTERN = r"https://cdn.leakgallery.com/content(-videos|\d+)?/[\w.-]+\.\w+"
|
|
|
|
|
|
__tests__ = (
|
|
{
|
|
"#url" : "https://leakgallery.com/sophieraiin/12240",
|
|
"#class" : leakgallery.LeakgalleryPostExtractor,
|
|
"#results": "https://cdn.leakgallery.com/content-videos/watermark_745_sophieraiin_241.mp4",
|
|
|
|
"id" : "12240",
|
|
"creator": "sophieraiin",
|
|
},
|
|
|
|
{
|
|
"#url" : "https://leakgallery.com/sophieraiin",
|
|
"#class" : leakgallery.LeakgalleryUserExtractor,
|
|
"#pattern": r"https://cdn.leakgallery.com/content3/(compressed_)?watermark_[0-9a-f]+_sophieraiin_\w+\.(jpg|png|mp4|mov)",
|
|
"#range" : "1-100",
|
|
"#count" : 100,
|
|
|
|
"creator": "sophieraiin",
|
|
},
|
|
|
|
{
|
|
"#url" : "https://leakgallery.com/trending-medias/Week",
|
|
"#class" : leakgallery.LeakgalleryTrendingExtractor,
|
|
"#pattern": FILE_PATTERN,
|
|
"#range" : "1-100",
|
|
"#count" : 100,
|
|
},
|
|
|
|
{
|
|
"#url" : "https://leakgallery.com/most-liked",
|
|
"#class" : leakgallery.LeakgalleryMostlikedExtractor,
|
|
"#pattern": FILE_PATTERN,
|
|
"#range" : "1-100",
|
|
"#count" : 100,
|
|
},
|
|
|
|
)
|