From 09e416660d56c98ac79156ad332587807e9b99bf Mon Sep 17 00:00:00 2001 From: Brian Rose Date: Wed, 9 Aug 2023 16:36:23 -0400 Subject: [PATCH 1/2] spoof user agent for noaa link check --- _config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_config.yml b/_config.yml index c9b49be..a1c8cff 100644 --- a/_config.yml +++ b/_config.yml @@ -29,6 +29,9 @@ sphinx: config: linkcheck_ignore: ["https://doi.org/*"] # don't run link checker on DOI links since they are immutable nb_execution_raise_on_error: true # raise exception in build if there are notebook errors (this flag is ignored if building on binder) + linkcheck_request_headers: + 'https://*.noaa.gov/': + User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0 html_favicon: notebooks/images/icons/favicon.ico html_last_updated_fmt: '%-d %B %Y' html_theme: sphinx_pythia_theme From 7e5b1630f0d7b29e8f87d93ea7aa06ac397cb2e2 Mon Sep 17 00:00:00 2001 From: Brian Rose Date: Wed, 9 Aug 2023 16:42:16 -0400 Subject: [PATCH 2/2] no wildcards in URL --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index a1c8cff..5dddda5 100644 --- a/_config.yml +++ b/_config.yml @@ -30,7 +30,7 @@ sphinx: linkcheck_ignore: ["https://doi.org/*"] # don't run link checker on DOI links since they are immutable nb_execution_raise_on_error: true # raise exception in build if there are notebook errors (this flag is ignored if building on binder) linkcheck_request_headers: - 'https://*.noaa.gov/': + 'https://www.noaa.gov/': User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0 html_favicon: notebooks/images/icons/favicon.ico html_last_updated_fmt: '%-d %B %Y'