mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-08 06:22:23 -04:00
handle 420 Reached limit when fetching robots in brozzler-hq
This commit is contained in:
parent
511e19ff4d
commit
e6eeca6ae2
3 changed files with 35 additions and 17 deletions
|
@ -238,7 +238,7 @@ class Browser:
|
|||
if (not self._reached_limit
|
||||
and message["params"]["response"]["status"] == 420
|
||||
and "Warcprox-Meta" in CaseInsensitiveDict(message["params"]["response"]["headers"])):
|
||||
warcprox_meta = json.loads(message["params"]["response"]["headers"]["Warcprox-Meta"])
|
||||
warcprox_meta = json.loads(CaseInsensitiveDict(message["params"]["response"]["headers"])["Warcprox-Meta"])
|
||||
self._reached_limit = brozzler.ReachedLimit(warcprox_meta=warcprox_meta)
|
||||
self.logger.info("reached limit %s", self._reached_limit)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue