From 1a286a7919cfad037a3c6216fd4aee34ad486c56 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 1 Mar 2018 12:40:33 -0500 Subject: [PATCH] enhancements Signed-off-by: Kenneth Reitz --- requests_html.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/requests_html.py b/requests_html.py index f925444..f5112ef 100644 --- a/requests_html.py +++ b/requests_html.py @@ -405,9 +405,14 @@ class HTML(BaseParser): loop = asyncio.get_event_loop() content = None + # Automatically set Reload to False, if example URL is being used. + if self.url == DEFAULT_URL: + reload = False + for i in range(retries): if not content: try: + content, result = loop.run_until_complete(_async_render(url=self.url, script=script, sleep=sleep, wait=wait, content=self.html, reload=reload, scrolldown=scrolldown, timeout=timeout)) except TimeoutError: pass