[pholder] add support (#2568 #9067)

* feat: extractor for pholder.com
    Closes #2568
* feat[pholder]: support gallery_id properly and tags
* doc[text.nameext_from_name]: minor typo in docstring

* remove '__init__' & 'request' methods and 'json' import
* use 'text.nameext_from_url' to ensure a 'filename' value
* fix 'imgur' links by disabling auto-Referer
* fix 'data["id"].partition()' call
    'partition' returns 3 elements
* use 'item["_source"]' data directly
* remove unused supportedsites overwrite
* catch all exceptions in '_thumb_resolution'
    fixes "KeyError: 'width'"
* use 'author' name for user folders

---------

Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
This commit is contained in:
Amar Paul
2026-02-15 03:46:18 -05:00
committed by GitHub
parent 01cb378baa
commit b552cdba04
7 changed files with 181 additions and 1 deletions

47
test/results/pholder.py Normal file
View File

@@ -0,0 +1,47 @@
# -*- 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 pholder
__tests__ = (
{
"#url" : "https://pholder.com/r/lavaporn",
"#category": ("", "pholder", "subreddit"),
"#class" : pholder.PholderSubredditExtractor,
"#range" : "1-20",
"#count" : ">= 20",
},
{
"#url" : "https://pholder.com/r/lavaporn/",
"#category": ("", "pholder", "subreddit"),
"#class" : pholder.PholderSubredditExtractor,
},
{
"#url" : "https://pholder.com/u/automoderator",
"#category": ("", "pholder", "user"),
"#class" : pholder.PholderUserExtractor,
"#range" : "1-20",
"#count" : ">= 20",
},
{
"#url" : "https://pholder.com/u/automoderator/",
"#category": ("", "pholder", "user"),
"#class" : pholder.PholderUserExtractor,
},
{
"#url" : "https://pholder.com/search-text",
"#category": ("", "pholder", "search"),
"#class" : pholder.PholderSearchExtractor,
"#range" : "1-10",
"#count" : "== 10",
},
)