From 8f24214915dd39efbbfac0ebf8d683e204e0bd53 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 29 Aug 2021 00:22:40 +0200 Subject: [PATCH] crawler: better name for custom fns --- morss/crawler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/morss/crawler.py b/morss/crawler.py index 87f0149..672ecb0 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -85,10 +85,10 @@ def adv_get(url, timeout=None, *args, **kwargs): url = sanitize_url(url) if timeout is None: - con = custom_handler(*args, **kwargs).open(url) + con = custom_opener(*args, **kwargs).open(url) else: - con = custom_handler(*args, **kwargs).open(url, timeout=timeout) + con = custom_opener(*args, **kwargs).open(url, timeout=timeout) data = con.read() @@ -104,7 +104,7 @@ def adv_get(url, timeout=None, *args, **kwargs): } -def custom_handler(follow=None, delay=None): +def custom_opener(follow=None, delay=None): handlers = [] # as per urllib2 source code, these Handelers are added first