diff --git a/pyQuARC/code/url_validator.py b/pyQuARC/code/url_validator.py index ae886fb4..55a74e61 100644 --- a/pyQuARC/code/url_validator.py +++ b/pyQuARC/code/url_validator.py @@ -1,3 +1,4 @@ +import os import requests from urlextract import URLExtract @@ -54,7 +55,7 @@ def status_code_from_request(url): validity = True # extract URLs from text - extractor = URLExtract(cache_dir="/tmp") + extractor = URLExtract(cache_dir=os.environ.get("CACHE_DIR")) urls = extractor.find_urls(text_with_urls) urls.extend(UrlValidator._extract_http_texts(text_with_urls))