Code cleanup.
This commit is contained in:
parent
c4191158ec
commit
4f03963b9e
2 changed files with 3 additions and 3 deletions
|
@ -57,6 +57,7 @@ class _BasicScraper(object):
|
||||||
self.indexes = tuple()
|
self.indexes = tuple()
|
||||||
|
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
|
"""Compare scraper by name and index list."""
|
||||||
if not isinstance(other, _BasicScraper):
|
if not isinstance(other, _BasicScraper):
|
||||||
return 1
|
return 1
|
||||||
# first, order by name
|
# first, order by name
|
||||||
|
@ -67,6 +68,7 @@ class _BasicScraper(object):
|
||||||
return cmp(self.indexes, other.indexes)
|
return cmp(self.indexes, other.indexes)
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
|
"""Get hash value from name and index list."""
|
||||||
return hash((self.get_name(), self.indexes))
|
return hash((self.get_name(), self.indexes))
|
||||||
|
|
||||||
def getCurrentStrips(self):
|
def getCurrentStrips(self):
|
||||||
|
|
|
@ -245,9 +245,7 @@ def handle_url(url, session, res):
|
||||||
print("ERROR matching activity:", repr(data[end:end+300]), file=sys.stderr)
|
print("ERROR matching activity:", repr(data[end:end+300]), file=sys.stderr)
|
||||||
continue
|
continue
|
||||||
active = mo.group(1).lower() == "active"
|
active = mo.group(1).lower() == "active"
|
||||||
res[name] = [
|
res[name] = [comicurl, desc, num, genre, active]
|
||||||
comicurl, desc, num, genre, active
|
|
||||||
]
|
|
||||||
if not res:
|
if not res:
|
||||||
print("ERROR:", "did not match any comics", file=sys.stderr)
|
print("ERROR:", "did not match any comics", file=sys.stderr)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue