* 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>
48 lines
1.2 KiB
Python
48 lines
1.2 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 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",
|
|
},
|
|
|
|
)
|