share extractor and downloader sessions

There was never any "good" reason for the strict separation
between extractors and downloaders. This change allows for
reduced resource usage (probably unnoticeable) and less lines
of code at the "cost" of tighter coupling.
This commit is contained in:
Mike Fährmann
2017-06-30 19:38:14 +02:00
parent 4414aefe97
commit 58e95a7487
9 changed files with 13 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Mike Fährmann
# Copyright 2016-2017 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -38,7 +38,6 @@ class SenmangaChapterExtractor(Extractor):
data = self.get_job_metadata()
yield Message.Version, 1
yield Message.Directory, data
yield Message.Headers, self.session.headers
for i in range(int(data["count"])):
page = str(i+1)
data["page"] = page