Throttle GrrlPower (fixes #179)

This commit is contained in:
Tobias Gruetzmacher 2021-03-20 00:52:28 +01:00
parent cc582ce6bb
commit 05a497fa8a

View file

@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2020 Tobias Gruetzmacher # Copyright (C) 2015-2021 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring # Copyright (C) 2019-2020 Daniel Ring
from re import compile, escape from re import compile, escape
@ -140,6 +140,10 @@ class GrrlPower(_WordPressScraper):
stripUrl = url + 'archives/comic/%s/' stripUrl = url + 'archives/comic/%s/'
firstStripUrl = stripUrl % 'gp0001' firstStripUrl = stripUrl % 'gp0001'
def __init__(self, name):
super().__init__(name)
self.session.add_throttle('grrlpowercomic.com', 1.0, 1.5)
class Guardia(_ParserScraper): class Guardia(_ParserScraper):
url = 'https://ssp-comics.com/comics/Guardia/' url = 'https://ssp-comics.com/comics/Guardia/'