1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[skeb] implement 'filters' option (#2945)

This commit is contained in:
Mike Fährmann 2022-09-26 15:17:28 +02:00
parent 32c30754d1
commit ac45ed2764
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 21 additions and 3 deletions

View File

@ -2208,6 +2208,18 @@ Description
Download thumbnails.
extractor.skeb.search.filters
-----------------------------
Type
``list`` or ``string``
Default
``["genre:art", "genre:voice", "genre:novel", "genre:video", "genre:music", "genre:correction"]``
Example
``"genre:music OR genre:voice"``
Description
Filters used during searches.
extractor.smugmug.videos
------------------------
Type

View File

@ -257,6 +257,7 @@
"skeb":
{
"article": false,
"filters": null,
"sent-requests": false,
"thumbnails": false
},

View File

@ -253,10 +253,15 @@ class SkebSearchExtractor(SkebExtractor):
"x-algolia-application-id": "HB1JT3KRE9",
}
filters = self.config("filters")
if filters is None:
filters = ("genre:art OR genre:voice OR genre:novel OR "
"genre:video OR genre:music OR genre:correction")
elif not isinstance(filters, str):
filters = " OR ".join(filters)
page = 0
pams = ("hitsPerPage=40&filters=genre%3Aart%20OR%20genre%3Avoice%20OR"
"%20genre%3Anovel%20OR%20genre%3Avideo%20OR%20genre%3Amusic%2"
"0OR%20genre%3Acorrection&page=")
pams = "hitsPerPage=40&filters=" + text.quote(filters) + "&page="
request = {
"indexName": "Request",