implement and use extractor.config() method

This commit is contained in:
Mike Fährmann
2017-04-25 17:12:48 +02:00
parent f0aa35ac84
commit 4b967fa189
7 changed files with 29 additions and 31 deletions

View File

@@ -38,6 +38,10 @@ class Extractor():
def skip(self, num):
return 0
def config(self, key, default=None):
return config.interpolate(
("extractor", self.category, self.subcategory, key), default)
def request(self, url, encoding=None, *args, **kwargs):
response = safe_request(self.session, url, *args, **kwargs)
if encoding: