|
|
|
@ -386,12 +386,14 @@ class Bureau(object):
|
|
|
|
|
|
|
|
|
|
# use an URL fetcher that waits 30s instead of 10s
|
|
|
|
|
def slowfetch(url, timeout=30, ssl_context=None):
|
|
|
|
|
print("fetching", url)
|
|
|
|
|
if len(url) < 50:
|
|
|
|
|
print("fetching", url)
|
|
|
|
|
import time
|
|
|
|
|
start = time.time()
|
|
|
|
|
ret = weasyprint.default_url_fetcher(url, 30, ssl_context)
|
|
|
|
|
elapsed = time.time() - start
|
|
|
|
|
print("fetched", url, "in", elapsed)
|
|
|
|
|
if len(url) < 50:
|
|
|
|
|
print("fetched", url, "in", elapsed)
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
|
|
weasyprint.HTML(url_fetcher=slowfetch,
|
|
|
|
|