diff options
| author | 2022-11-01 21:32:54 -0400 | |
|---|---|---|
| committer | 2022-11-01 21:32:54 -0400 | |
| commit | e59d46ecda74190381b1d2725b0bd9df5c0be8d8 (patch) | |
| tree | cff6d69d4f68ef011a496ff2311173ebef70bf3f /gallery_dl/extractor/gelbooru.py | |
| parent | 78e2d1672e4301497f786cd03637de9ddbc717ac (diff) | |
New upstream version 1.23.5.upstream/1.23.5
Diffstat (limited to 'gallery_dl/extractor/gelbooru.py')
| -rw-r--r-- | gallery_dl/extractor/gelbooru.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gallery_dl/extractor/gelbooru.py b/gallery_dl/extractor/gelbooru.py index 92f7ac2..a2cf0c0 100644 --- a/gallery_dl/extractor/gelbooru.py +++ b/gallery_dl/extractor/gelbooru.py @@ -142,13 +142,23 @@ class GelbooruPoolExtractor(GelbooruBase, class GelbooruPostExtractor(GelbooruBase, gelbooru_v02.GelbooruV02PostExtractor): """Extractor for single images from gelbooru.com""" - pattern = (r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?" - r"\?page=post&s=view&id=(?P<post>\d+)") + pattern = (r"(?:https?://)?(?:www\.)?gelbooru\.com/(?:index\.php)?\?" + r"(?=(?:[^#]+&)?page=post(?:&|#|$))" + r"(?=(?:[^#]+&)?s=view(?:&|#|$))" + r"(?:[^#]+&)?id=(\d+)") test = ( ("https://gelbooru.com/index.php?page=post&s=view&id=313638", { "content": "5e255713cbf0a8e0801dc423563c34d896bb9229", "count": 1, }), + + ("https://gelbooru.com/index.php?page=post&s=view&id=313638"), + ("https://gelbooru.com/index.php?s=view&page=post&id=313638"), + ("https://gelbooru.com/index.php?page=post&id=313638&s=view"), + ("https://gelbooru.com/index.php?s=view&id=313638&page=post"), + ("https://gelbooru.com/index.php?id=313638&page=post&s=view"), + ("https://gelbooru.com/index.php?id=313638&s=view&page=post"), + ("https://gelbooru.com/index.php?page=post&s=view&id=6018318", { "options": (("tags", True),), "content": "977caf22f27c72a5d07ea4d4d9719acdab810991", |
