Small code clean ups

master
pictuga 2020-04-19 12:50:05 +02:00
parent 7e45b2611d
commit 4ce3c7cb32
4 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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)