From 991e9777d6c1a1676f8580dfe4393c9720ee18cc Mon Sep 17 00:00:00 2001 From: Clemens Schmid Date: Tue, 29 Jul 2025 13:14:13 +0200 Subject: [PATCH] Add user agent to curl in QPA example Otherwise, download is blocked by Cloudflare --- examples/QPA-Quantitative phase analysis.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/QPA-Quantitative phase analysis.ipynb b/examples/QPA-Quantitative phase analysis.ipynb index 1dd4819..0d77888 100644 --- a/examples/QPA-Quantitative phase analysis.ipynb +++ b/examples/QPA-Quantitative phase analysis.ipynb @@ -113,7 +113,7 @@ "source": [ "p = PowderPattern()\n", "if not os.path.exists(data_file):\n", - " os.system(\"curl -O https://www.iucr.org/__data/iucr/powder/QARR/col/%s\" % data_file)\n", + " os.system(\"curl -O -q -H \\\"User-Agent: Mozilla/5.0 (Windows NT 11.0; Win64; x64)\\\" https://www.iucr.org/__data/iucr/powder/QARR/col/%s\" % data_file)\n", "\n", "p.ImportPowderPattern2ThetaObs(data_file)\n", "# Copper K-alpha1+alpha2. Use \"Cua1\" for Cu-alpha1 only\n",