improve 'parse_query()' and add tests

- another irrelevant micro-optimization !
- use urllib.parse.parse_qsl directly instead of parse_qs, which
  just packs the results of parse_qsl in a different data structure
- reduced memory requirements since no additional dict and lists are
  created
This commit is contained in:
Mike Fährmann
2018-04-13 19:21:32 +02:00
parent 51ea699083
commit 5c487300ee
3 changed files with 37 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ class HitomiGalleryExtractor(ChapterExtractor):
test = [
("https://hitomi.la/galleries/867789.html", {
"url": "cb759868d090fe0e2655c3e29ebf146054322b6d",
"keyword": "b1e66ff971fc8cb80240a687f508f3b74053f799",
"keyword": "85e453d01ee7f137669e75a764ccdc65ca092ad2",
}),
("https://hitomi.la/reader/867789.html", None),
]