Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added headers to fix fetcher can handle the ACS #12389

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

laky241
Copy link

@laky241 laky241 commented Jan 14, 2025

Fixes #11357

Added user agent and referer header, which solves the "403" error fetcher client exception.

@@ -140,6 +140,9 @@ public Optional<BibEntry> performSearchById(String identifier) throws FetcherExc
URLDownload download = getUrlDownload(doiURL);
download.addHeader("Accept", MediaTypes.APPLICATION_BIBTEX);

download.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could update the header at and use that

public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

403 for "lookup fulltext"
2 participants