diff --git a/doc/intro.rst b/doc/intro.rst index e1887ef91..a99d4bbfd 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -84,7 +84,7 @@ Citing eXSpy If eXSpy has been significant to a project that leads to an academic publication, please acknowledge that fact by citing it. The DOI in the -badge below is the `Concept DOI `_ of +badge below is the `Concept DOI `_ of eXSpy. It can be used to cite the project without referring to a specific version. If you are citing eXSpy because you have used it to process data, please use the DOI of the specific version that you have employed. You can diff --git a/exspy/misc/eels/eelsdb.py b/exspy/misc/eels/eelsdb.py index 709399d38..b125378cf 100644 --- a/exspy/misc/eels/eelsdb.py +++ b/exspy/misc/eels/eelsdb.py @@ -248,8 +248,14 @@ def eelsdb( if show_progressbar is None: show_progressbar = preferences.General.show_progressbar + headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" + } request = requests.get( - "https://api.eelsdb.eu/spectra", params=params, verify=verify_certificate + "https://api.eelsdb.eu/spectra", + params=params, + verify=verify_certificate, + headers=headers, ) spectra = [] jsons = request.json() @@ -271,7 +277,9 @@ def eelsdb( f"Permalink: {json_spectrum['permalink']}" ) continue - msa_string = requests.get(download_link, verify=verify_certificate).text + msa_string = requests.get( + download_link, verify=verify_certificate, headers=headers + ).text try: s = dict2signal(parse_msa_string(msa_string)[0]) emsa = s.original_metadata diff --git a/upcoming_changes/66.bugfix.rst b/upcoming_changes/66.bugfix.rst new file mode 100644 index 000000000..efbabdcbc --- /dev/null +++ b/upcoming_changes/66.bugfix.rst @@ -0,0 +1 @@ +Fix blocked eelsdb queries \ No newline at end of file