From 4ce3c7cb32bb3bc1bfa1ffaa3b5058f792ac2d55 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 19 Apr 2020 12:50:05 +0200 Subject: [PATCH] Small code clean ups --- README.md | 1 - morss/crawler.py | 1 - morss/feeds.py | 2 +- morss/morss.py | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 450cf81..88ff95b 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,6 @@ morss will auto-detect what "mode" to use. For this, you'll want to change a bit the architecture of the files, for example into something like this. - ``` / ├── cgi diff --git a/morss/crawler.py b/morss/crawler.py index d877115..790c67d 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -72,7 +72,6 @@ def custom_handler(follow=None, delay=None, encoding=None): handlers.append(HTTPRefreshHandler()) handlers.append(UAHandler(DEFAULT_UA)) handlers.append(BrowserlyHeaderHandler()) - handlers.append(EncodingFixHandler(encoding)) if follow: diff --git a/morss/feeds.py b/morss/feeds.py index 3801b28..f20c0b6 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -85,7 +85,7 @@ def parse(data, url=None, mimetype=None, encoding=None): for path in ruleset['path']: if fnmatch(url, path): parser = [x for x in parsers if x.mode == ruleset['mode']][0] - return parser(data, ruleset, encoding=encoding) + return parser(data, ruleset, encoding=encoding) # 2) Try each and every parser diff --git a/morss/morss.py b/morss/morss.py index a317457..0ddae35 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -550,7 +550,7 @@ def cgi_app(environ, start_response): def middleware(func): " Decorator to turn a function into a wsgi middleware " - # This is called when parsing the code + # This is called when parsing the "@middleware" code def app_builder(app): # This is called when doing app = cgi_wrapper(app)