Migrate SmackJeeves to single-class module.

This commit is contained in:
Tobias Gruetzmacher 2016-05-22 23:54:21 +02:00
parent 1ea20e1743
commit f5dff27b0a
2 changed files with 663 additions and 2684 deletions

File diff suppressed because it is too large Load diff

View file

@ -164,14 +164,13 @@ class SmackJeevesUpdater(ComicListUpdater):
def get_entry(self, name, data): def get_entry(self, name, data):
sub, top = urlsplit(data[0]).hostname.split('.', 1) sub, top = urlsplit(data[0]).hostname.split('.', 1)
cl = u"class SJ%s(_SmackJeeves):" % name
if top.lower() == "smackjeeves.com": if top.lower() == "smackjeeves.com":
cl += "\n sub = '%s'" % sub opt = "sub='%s'" % sub
else: else:
cl += "\n host = '%s.%s'" % (sub, top) opt = "host='%s.%s'" % (sub, top)
if data[1]: if data[1]:
cl += "\n adult = True" opt += ", adult=True"
return cl return u"cls('%s', %s)," % (name, opt)
if __name__ == '__main__': if __name__ == '__main__':
SmackJeevesUpdater(__file__).run() SmackJeevesUpdater(__file__).run()