Migrate SmackJeeves to single-class module.
This commit is contained in:
parent
1ea20e1743
commit
f5dff27b0a
2 changed files with 663 additions and 2684 deletions
File diff suppressed because it is too large
Load diff
|
@ -164,14 +164,13 @@ class SmackJeevesUpdater(ComicListUpdater):
|
|||
|
||||
def get_entry(self, name, data):
|
||||
sub, top = urlsplit(data[0]).hostname.split('.', 1)
|
||||
cl = u"class SJ%s(_SmackJeeves):" % name
|
||||
if top.lower() == "smackjeeves.com":
|
||||
cl += "\n sub = '%s'" % sub
|
||||
opt = "sub='%s'" % sub
|
||||
else:
|
||||
cl += "\n host = '%s.%s'" % (sub, top)
|
||||
opt = "host='%s.%s'" % (sub, top)
|
||||
if data[1]:
|
||||
cl += "\n adult = True"
|
||||
return cl
|
||||
opt += ", adult=True"
|
||||
return u"cls('%s', %s)," % (name, opt)
|
||||
|
||||
if __name__ == '__main__':
|
||||
SmackJeevesUpdater(__file__).run()
|
||||
|
|
Loading…
Reference in a new issue