Skip to content

Commit

Permalink
mangadex: minor spacing changes to fit the style guide
Browse files Browse the repository at this point in the history
nee committed Sep 22, 2018
1 parent 3936819 commit f32df33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cum/scrapers/mangadex.py
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ def _get_page(self, url):
# sleep 10-17 seconds to wait out the spam protection
# and make it less likely for all threads to hit at the same time
sleep(randrange(10000, 17000) / 1000.0)
self.spam_failures = self.spam_failures+1
self.spam_failures = self.spam_failures + 1
return self._get_page(url)
elif self.spam_failures >= 3:
print("Error: Mangadex server probably contacted too often\n")
@@ -71,6 +71,7 @@ def get_chapters(self):
def name(self):
return self.json['manga']['title']


class MangadexChapter(BaseChapter):
# match /chapter/12345 and avoid urls like /chapter/1235/comments
url_re = re.compile(
@@ -97,7 +98,7 @@ def available(self):
else:
return True

def download(self):
def download(self):
if getattr(self, 'r', None):
r = self.r
else:

0 comments on commit f32df33

Please sign in to comment.