Skip to content

Commit

Permalink
[philomena] support post URLs without '/images/'
Browse files Browse the repository at this point in the history
e.g. 'derpibooru.org/1'
  • Loading branch information
mikf committed Mar 14, 2021
1 parent 466966b commit 847e9b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/philomena.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _pagination(self, url, params):
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",
Expand Down Expand Up @@ -120,6 +120,7 @@ class PhilomenaPostExtractor(PhilomenaExtractor):
"wilson_score": float,
},
}),
("https://derpibooru.org/1"),
("https://ponybooru.org/images/1", {
"content": "bca26f58fafd791fe07adcd2a28efd7751824605",
}),
Expand Down

0 comments on commit 847e9b0

Please sign in to comment.