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

[philomena] support post URLs without '/images/'

e.g. 'derpibooru.org/1'
This commit is contained in:
Mike Fährmann 2021-03-14 18:22:56 +01:00
parent 466966bf83
commit 847e9b0ed7
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -70,7 +70,7 @@ BASE_PATTERN = PhilomenaExtractor.update(INSTANCES)
class PhilomenaPostExtractor(PhilomenaExtractor):
"""Extractor for single posts on a Philomena booru"""
subcategory = "post"
pattern = BASE_PATTERN + r"/images/(\d+)"
pattern = BASE_PATTERN + r"/(?:images/)?(\d+)"
test = (
("https://derpibooru.org/images/1", {
"content": "88449eeb0c4fa5d3583d0b794f6bc1d70bf7f889",
@ -120,6 +120,7 @@ class PhilomenaPostExtractor(PhilomenaExtractor):
"wilson_score": float,
},
}),
("https://derpibooru.org/1"),
("https://ponybooru.org/images/1", {
"content": "bca26f58fafd791fe07adcd2a28efd7751824605",
}),