EZproxy support is opt-in and only affects paper attach-pdfs.
-
Configure your institution's EZproxy. Two modes — pick one:
Mode A — hostname rewriting (recommended). Most modern institutions rewrite the publisher host (e.g. Lehigh:
www.nature.com→www-nature-com.ezproxy.lib.lehigh.edu). Set the EZproxy host suffix:research-hub config set ezproxy_host_suffix "ezproxy.lib.lehigh.edu"
This is preferred: PDFs are fetched directly from the rewritten host with no
/login?qurl=EZproxyCheckBackJavaScript interstitial (which a non-browser HTTP client cannot follow, so PDF downloads would otherwise fail). To find your suffix, click a publisher link from your library portal and read it off the rewritten address bar (everything after the first host label). With theezproxy loginpopup you can skip this step — it auto-detects the suffix from your captured cookies after you sign in. (The--from-browserpath below imports cookies using the suffix, so set it explicitly if you use that.)Mode B — login template (legacy fallback). Only if your institution does not support hostname rewriting. The template must contain
{encoded_url}:research-hub config set ezproxy_url_template "https://login.example.edu/login?qurl={encoded_url}"
If both are set, hostname rewriting takes priority.
-
Capture your institutional session once. Either:
research-hub ezproxy login # opens a browser — sign in, then close itCookies save automatically every second while the window is open, so even an abrupt close keeps them. Or skip the popup and reuse a browser you are already signed into:
research-hub ezproxy login --from-browser chrome # imports cookies via rookiepy--from-browserneeds thebrowser-authextra (pip install 'research-hub-pipeline[browser-auth]'); rookiepy has no Python 3.14 wheel yet, so on 3.14 use the plainezproxy login. -
Verify state:
research-hub ezproxy status
-
Re-run
paper attach-pdfs. Paywalled publisher PDF URLs now try the proxy first and fall back to the direct URL on any proxy failure.
Cookies usually last 1-4 weeks before your institution requires re-login.