change keyword names to valid Python identifiers

This commit mostly replaces all minus-signs ('-') in keyword names with
underscores ('_') to allow them to be used in filter-expressions. For
example 'gallery-id' got renamed to 'gallery_id'.

(It is theoretically possible to access any variable, regardless of its
name, with 'locals()["NAME"]', but that seems a bit too convoluted if
just 'NAME' could be enough)
This commit is contained in:
Mike Fährmann
2017-09-10 22:20:47 +02:00
parent 81877bb5f6
commit 6f30cf4c64
28 changed files with 157 additions and 154 deletions

View File

@@ -16,8 +16,8 @@ import json
class HentaicdnChapterExtractor(Extractor):
"""Base class for extractors for a single manga chapter"""
subcategory = "chapter"
directory_fmt = ["{category}", "{manga-id} {title}"]
filename_fmt = ("{category}_{manga-id}_{chapter:>02}_"
directory_fmt = ["{category}", "{manga_id} {title}"]
filename_fmt = ("{category}_{manga_id}_{chapter:>02}_"
"{num:>03}.{extension}")
url = ""