simplify extractor constants
- single strings for URL patterns - tuples instead of lists for 'directory_fmt' and 'test' - single-tuple tests where applicable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2015-2018 Mike Fährmann
|
||||
# Copyright 2015-2019 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
|
||||
@@ -17,10 +17,10 @@ import re
|
||||
class RecursiveExtractor(Extractor):
|
||||
"""Extractor that fetches URLs from a remote or local source"""
|
||||
category = "recursive"
|
||||
pattern = [r"r(?:ecursive)?:(.+)"]
|
||||
test = [("recursive:https://pastebin.com/raw/FLwrCYsT", {
|
||||
pattern = r"r(?:ecursive)?:(.+)"
|
||||
test = ("recursive:https://pastebin.com/raw/FLwrCYsT", {
|
||||
"url": "eee86d65c346361b818e8f4b2b307d9429f136a2",
|
||||
})]
|
||||
})
|
||||
|
||||
def __init__(self, match):
|
||||
Extractor.__init__(self)
|
||||
|
||||
Reference in New Issue
Block a user