[tests/extractor] test 'extractor.find()' results

This commit is contained in:
Mike Fährmann
2026-02-10 20:46:44 +01:00
parent 102f8da294
commit 448ec12b8b
3 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2025 Mike Fährmann
# Copyright 2015-2026 Mike Fährmann
#
# 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
@@ -634,7 +634,8 @@ class DeviantartGalleryExtractor(DeviantartExtractor):
subcategory = "gallery"
archive_fmt = "g_{_username}_{index}.{extension}"
pattern = (BASE_PATTERN + r"/gallery"
r"(?:/all|/recommended-for-you)?/?(\?(?!q=).*)?$")
r"(?:/all|/recommended-for-you)?"
r"/?(\?(?!q=|catpath=scraps).*)?$")
example = "https://www.deviantart.com/USER/gallery/"
def deviations(self):

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2025 Mike Fährmann
# Copyright 2017-2026 Mike Fährmann
#
# 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
@@ -305,7 +305,7 @@ class RedditUserExtractor(RedditExtractor):
subcategory = "user"
directory_fmt = ("{category}", "Users", "{user[name]}")
pattern = (r"(?:https?://)?(?:\w+\.)?reddit\.com/u(?:ser)?/"
r"([^/?#]+)(/[a-z]+)?/?(?:\?([^#]*))?")
r"([^/?#]+)(/[a-z]+)?/?(?:\?([^#]*))?$")
example = "https://www.reddit.com/user/USER/"
def __init__(self, match):