aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paper2remarkable/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/paper2remarkable/utils.py b/paper2remarkable/utils.py
index 39cf547..969dc32 100644
--- a/paper2remarkable/utils.py
+++ b/paper2remarkable/utils.py
@@ -122,8 +122,10 @@ def follow_redirects(url):
if not "Location" in req.headers:
break
url = req.headers["Location"]
- jar = req.cookies
+ jar.update(req.cookies)
it += 1
+ if it == 100:
+ logger.warning("Max redirects reached. There may be a problem.")
jar = jar or req.cookies
return url, jar