litloop 1.18.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- litloop/__init__.py +89 -0
- litloop/__main__.py +6 -0
- litloop/_source_hygiene.py +158 -0
- litloop/agents/__init__.py +13 -0
- litloop/agents/client.py +164 -0
- litloop/agents/runner.py +123 -0
- litloop/agents/system.py +54 -0
- litloop/agents/tools.py +142 -0
- litloop/app_server.py +8 -0
- litloop/browser/__init__.py +1 -0
- litloop/browser/backend.py +1009 -0
- litloop/browser/camofox_api.py +368 -0
- litloop/browser/chrome_copy.py +136 -0
- litloop/browser/cloakbrowser_compat.py +72 -0
- litloop/browser/cookies.py +347 -0
- litloop/browser/engine.py +965 -0
- litloop/browser/login.py +636 -0
- litloop/browser/pdf.py +263 -0
- litloop/browser/profile_health.py +167 -0
- litloop/browser/runtime.py +210 -0
- litloop/cache.py +104 -0
- litloop/citations/__init__.py +1 -0
- litloop/citations/bib_import.py +102 -0
- litloop/citations/bibtex_crossref.py +143 -0
- litloop/citations/formats.py +225 -0
- litloop/citations/paper_list.py +200 -0
- litloop/citations/session_export.py +94 -0
- litloop/cli/__init__.py +12 -0
- litloop/cli/_utils.py +267 -0
- litloop/cli/commands.py +1098 -0
- litloop/cli/doctor.py +141 -0
- litloop/cli/main.py +1173 -0
- litloop/cli/web.py +190 -0
- litloop/config.py +413 -0
- litloop/data/VARCON-LICENSE.txt +62 -0
- litloop/data/elements.tsv +119 -0
- litloop/data/institutional_identity_policy.json +165 -0
- litloop/data/publisher_access_catalog.json +969 -0
- litloop/data/publisher_carsi.json +105 -0
- litloop/data/spelling_search.tsv.gz +0 -0
- litloop/data/spelling_us.tsv.gz +0 -0
- litloop/data/webvpn.dat +0 -0
- litloop/data/webvpn.json +603 -0
- litloop/db.py +1922 -0
- litloop/deps.py +128 -0
- litloop/desktop/__init__.py +1 -0
- litloop/desktop/agent_runner.py +537 -0
- litloop/desktop/download_jobs.py +571 -0
- litloop/desktop/error_text.py +192 -0
- litloop/desktop/server.py +999 -0
- litloop/desktop/settings.py +552 -0
- litloop/desktop/translate.py +103 -0
- litloop/diagnostics.py +126 -0
- litloop/download/__init__.py +1 -0
- litloop/download/doi_check.py +44 -0
- litloop/download/fetcher.py +975 -0
- litloop/download/markdown.py +130 -0
- litloop/download/pdf.py +454 -0
- litloop/download/pipeline.py +1166 -0
- litloop/download/progress.py +312 -0
- litloop/download/rename.py +211 -0
- litloop/extractors/__init__.py +0 -0
- litloop/extractors/html_extractor.py +31 -0
- litloop/extractors/pdf_extractor.py +151 -0
- litloop/extractors/publisher_adapters/__init__.py +0 -0
- litloop/extractors/publisher_adapters/acs.py +167 -0
- litloop/extractors/publisher_adapters/elsevier.py +178 -0
- litloop/extractors/publisher_adapters/generic.py +191 -0
- litloop/extractors/publisher_adapters/nature.py +204 -0
- litloop/extractors/publisher_adapters/rsc.py +154 -0
- litloop/extractors/publisher_adapters/tandfonline.py +154 -0
- litloop/extractors/publisher_adapters/wiley.py +160 -0
- litloop/http_utils.py +57 -0
- litloop/identifiers.py +134 -0
- litloop/institutional/__init__.py +1 -0
- litloop/institutional/auth.py +576 -0
- litloop/institutional/carsi_login.py +569 -0
- litloop/institutional/config_adapter.py +63 -0
- litloop/institutional/proxy_check.py +98 -0
- litloop/institutional/remote_assist.py +274 -0
- litloop/institutional/schools.py +102 -0
- litloop/institutional/session_heal.py +73 -0
- litloop/institutional/session_store.py +105 -0
- litloop/log.py +47 -0
- litloop/models.py +269 -0
- litloop/network.py +417 -0
- litloop/optional.py +310 -0
- litloop/publishers/__init__.py +1 -0
- litloop/publishers/access.py +232 -0
- litloop/publishers/pdf_router.py +451 -0
- litloop/publishers/profiles.py +899 -0
- litloop/publishers/strategies/__init__.py +122 -0
- litloop/publishers/strategies/_core.py +2340 -0
- litloop/publishers/strategies/_elsevier_api.py +578 -0
- litloop/publishers/strategies/acm.py +27 -0
- litloop/publishers/strategies/acs.py +42 -0
- litloop/publishers/strategies/aip.py +27 -0
- litloop/publishers/strategies/aps.py +29 -0
- litloop/publishers/strategies/asce.py +28 -0
- litloop/publishers/strategies/base.py +108 -0
- litloop/publishers/strategies/copernicus.py +24 -0
- litloop/publishers/strategies/elsevier.py +66 -0
- litloop/publishers/strategies/generic.py +39 -0
- litloop/publishers/strategies/ieee.py +28 -0
- litloop/publishers/strategies/iop.py +27 -0
- litloop/publishers/strategies/nature.py +27 -0
- litloop/publishers/strategies/oxford.py +27 -0
- litloop/publishers/strategies/registry.py +83 -0
- litloop/publishers/strategies/royalsociety.py +28 -0
- litloop/publishers/strategies/rsc.py +27 -0
- litloop/publishers/strategies/sage.py +30 -0
- litloop/publishers/strategies/science.py +27 -0
- litloop/publishers/strategies/springer.py +34 -0
- litloop/publishers/strategies/tandfonline.py +32 -0
- litloop/publishers/strategies/wiley.py +32 -0
- litloop/publishers/supplementary.py +219 -0
- litloop/quota.py +202 -0
- litloop/search/__init__.py +1 -0
- litloop/search/abstracts.py +291 -0
- litloop/search/deep.py +1216 -0
- litloop/search/quick.py +1102 -0
- litloop/search/scansci_find.py +410 -0
- litloop/search/screening.py +225 -0
- litloop/search/title_to_doi.py +163 -0
- litloop/search/watches.py +124 -0
- litloop/server.py +1731 -0
- litloop/sources/__init__.py +1339 -0
- litloop/sources/_batch.py +529 -0
- litloop/sources/_index.py +221 -0
- litloop/sources/_routes.py +290 -0
- litloop/sources/altcha.py +90 -0
- litloop/sources/arxiv.py +45 -0
- litloop/sources/attempt.py +91 -0
- litloop/sources/carsi.py +74 -0
- litloop/sources/core_api.py +46 -0
- litloop/sources/crossref.py +162 -0
- litloop/sources/elsevier_api.py +620 -0
- litloop/sources/elsevier_check.py +274 -0
- litloop/sources/europepmc.py +81 -0
- litloop/sources/ezproxy.py +317 -0
- litloop/sources/instsci.py +1295 -0
- litloop/sources/libgen.py +116 -0
- litloop/sources/nature.py +39 -0
- litloop/sources/oa_discovery.py +135 -0
- litloop/sources/openaire.py +122 -0
- litloop/sources/openalex.py +100 -0
- litloop/sources/publishers.py +684 -0
- litloop/sources/sage_cn.py +139 -0
- litloop/sources/scibban.py +10 -0
- litloop/sources/scihub.py +1379 -0
- litloop/sources/scihub_domains.py +203 -0
- litloop/sources/scihub_speed.py +187 -0
- litloop/sources/scoring.py +250 -0
- litloop/sources/semantic_scholar.py +146 -0
- litloop/sources/springer_tdm.py +172 -0
- litloop/sources/unpaywall.py +116 -0
- litloop/sources/vpnsci.py +38 -0
- litloop/store.py +264 -0
- litloop/templates/index.html +347 -0
- litloop/terms/__init__.py +1 -0
- litloop/terms/glossary.py +422 -0
- litloop/terms/spelling.py +89 -0
- litloop/terms/text.py +106 -0
- litloop/tor/__init__.py +1 -0
- litloop/tor/embedded.py +371 -0
- litloop/tor/proxy.py +110 -0
- litloop/updates.py +148 -0
- litloop/zotero/__init__.py +1 -0
- litloop/zotero/bridge.py +309 -0
- litloop/zotero/client.py +317 -0
- litloop-1.18.3.dist-info/METADATA +347 -0
- litloop-1.18.3.dist-info/RECORD +176 -0
- litloop-1.18.3.dist-info/WHEEL +5 -0
- litloop-1.18.3.dist-info/entry_points.txt +2 -0
- litloop-1.18.3.dist-info/licenses/LICENSE +197 -0
- litloop-1.18.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,899 @@
|
|
|
1
|
+
"""Publisher profiles: DOI prefixes, official PDF routes and URL markers.
|
|
2
|
+
|
|
3
|
+
Used by the lane fetcher (``fetcher``, ``publisher_pdf_router``) and the
|
|
4
|
+
publisher access checks (``publisher_access``). The SSO fields
|
|
5
|
+
(auth_url_markers, sso_text_markers, institution_input_selectors,
|
|
6
|
+
institution_result_selectors) were read by the per-publisher batch
|
|
7
|
+
downloader, removed 2026-10-20 (docs/DECISIONS.md); the publisher windows
|
|
8
|
+
use ``_publisher_strategies_core._PUBLISHER_SSO_CONFIG`` instead.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from dataclasses import dataclass, field
|
|
14
|
+
from urllib.parse import quote, urlparse
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass(frozen=True)
|
|
18
|
+
class PdfSourcePathTemplate:
|
|
19
|
+
"""Route a publisher landing/source URL path to a PDF path."""
|
|
20
|
+
|
|
21
|
+
domain: str
|
|
22
|
+
path_prefix: str
|
|
23
|
+
path_template: str
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
class PublisherProfile:
|
|
28
|
+
"""Declarative rules for a publisher-specific download workflow."""
|
|
29
|
+
|
|
30
|
+
name: str
|
|
31
|
+
article_url_template: str
|
|
32
|
+
pdf_url_templates: tuple[str, ...]
|
|
33
|
+
success_url_markers: tuple[str, ...]
|
|
34
|
+
auth_url_markers: tuple[str, ...]
|
|
35
|
+
auth_title_markers: tuple[str, ...]
|
|
36
|
+
sso_text_markers: tuple[str, ...]
|
|
37
|
+
aliases: tuple[str, ...] = field(default_factory=tuple)
|
|
38
|
+
doi_prefixes: tuple[str, ...] = field(default_factory=tuple)
|
|
39
|
+
sample_dois: tuple[str, ...] = field(default_factory=tuple)
|
|
40
|
+
base_domains: tuple[str, ...] = field(default_factory=tuple)
|
|
41
|
+
pdf_source_path_templates: tuple[PdfSourcePathTemplate, ...] = field(default_factory=tuple)
|
|
42
|
+
pdf_url_markers: tuple[str, ...] = (
|
|
43
|
+
"/doi/pdf/",
|
|
44
|
+
"/doi/epdf/",
|
|
45
|
+
"/pdf/",
|
|
46
|
+
"/pdf",
|
|
47
|
+
"pdf",
|
|
48
|
+
)
|
|
49
|
+
pdf_link_text_markers: tuple[str, ...] = ("pdf",)
|
|
50
|
+
supplementary_url_markers: tuple[str, ...] = (
|
|
51
|
+
"suppl_file",
|
|
52
|
+
"suppdata",
|
|
53
|
+
"supporting-information",
|
|
54
|
+
"supplementary",
|
|
55
|
+
)
|
|
56
|
+
institution_input_selectors: tuple[str, ...] = field(default_factory=tuple)
|
|
57
|
+
institution_result_selectors: tuple[str, ...] = field(default_factory=tuple)
|
|
58
|
+
|
|
59
|
+
def article_url(self, doi: str) -> str:
|
|
60
|
+
if self.name.lower() == "aps":
|
|
61
|
+
return _aps_article_url(doi) or self.article_url_template.format(doi=doi)
|
|
62
|
+
return self.article_url_template.format(doi=doi)
|
|
63
|
+
|
|
64
|
+
def pdf_urls(self, doi: str) -> list[str]:
|
|
65
|
+
doi_suffix = doi.split("/", 1)[-1] if "/" in doi else doi
|
|
66
|
+
values = {
|
|
67
|
+
"doi": doi,
|
|
68
|
+
"doi_quoted": quote(doi, safe=""),
|
|
69
|
+
"doi_suffix": doi_suffix,
|
|
70
|
+
"doi_suffix_quoted": quote(doi_suffix, safe=""),
|
|
71
|
+
}
|
|
72
|
+
return [template.format(**values) for template in self.pdf_url_templates]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _aps_article_url(doi: str) -> str:
|
|
76
|
+
suffix = doi.split("/", 1)[-1] if "/" in doi else doi
|
|
77
|
+
journal_codes = (
|
|
78
|
+
("PhysRevLett.", "prl"),
|
|
79
|
+
("PhysRevA.", "pra"),
|
|
80
|
+
("PhysRevB.", "prb"),
|
|
81
|
+
("PhysRevC.", "prc"),
|
|
82
|
+
("PhysRevD.", "prd"),
|
|
83
|
+
("PhysRevE.", "pre"),
|
|
84
|
+
("PhysRevX.", "prx"),
|
|
85
|
+
("PhysRevApplied.", "prapplied"),
|
|
86
|
+
("PhysRevResearch.", "prresearch"),
|
|
87
|
+
("RevModPhys.", "rmp"),
|
|
88
|
+
("PRXQuantum.", "prxquantum"),
|
|
89
|
+
)
|
|
90
|
+
for prefix, journal_code in journal_codes:
|
|
91
|
+
if suffix.startswith(prefix):
|
|
92
|
+
return f"https://journals.aps.org/{journal_code}/abstract/{doi}"
|
|
93
|
+
return ""
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
ACS_PROFILE = PublisherProfile(
|
|
97
|
+
name="ACS",
|
|
98
|
+
article_url_template="https://pubs.acs.org/doi/{doi}",
|
|
99
|
+
pdf_url_templates=(
|
|
100
|
+
"https://pubs.acs.org/doi/pdf/{doi}?ref=article_openPDF",
|
|
101
|
+
"https://pubs.acs.org/doi/pdf/{doi}",
|
|
102
|
+
"https://pubs.acs.org/doi/epdf/{doi}",
|
|
103
|
+
),
|
|
104
|
+
success_url_markers=("pubs.acs.org/doi/",),
|
|
105
|
+
auth_url_markers=(
|
|
106
|
+
"id.tsinghua.edu.cn",
|
|
107
|
+
"idp.tsinghua.edu.cn",
|
|
108
|
+
"login.openathens.net",
|
|
109
|
+
"/action/ssostart",
|
|
110
|
+
"/saml/",
|
|
111
|
+
"/sso/",
|
|
112
|
+
"/login",
|
|
113
|
+
),
|
|
114
|
+
auth_title_markers=(
|
|
115
|
+
"Tsinghua",
|
|
116
|
+
"OpenAthens",
|
|
117
|
+
"Identity",
|
|
118
|
+
"Login",
|
|
119
|
+
"Sign In",
|
|
120
|
+
),
|
|
121
|
+
sso_text_markers=(
|
|
122
|
+
"access through",
|
|
123
|
+
"access through institution",
|
|
124
|
+
"access through your institution",
|
|
125
|
+
"institutional access",
|
|
126
|
+
"log in through your institution",
|
|
127
|
+
),
|
|
128
|
+
aliases=("acs", "american-chemical-society"),
|
|
129
|
+
doi_prefixes=("10.1021",),
|
|
130
|
+
sample_dois=("10.1021/acs.est.6c00693",),
|
|
131
|
+
base_domains=("pubs.acs.org",),
|
|
132
|
+
institution_input_selectors=(
|
|
133
|
+
"input[placeholder='Search By University or Organization']",
|
|
134
|
+
"input[placeholder*='University']",
|
|
135
|
+
"input[placeholder*='Organization']",
|
|
136
|
+
"#searchInstitution",
|
|
137
|
+
),
|
|
138
|
+
institution_result_selectors=(
|
|
139
|
+
"button:has-text('Tsinghua University')",
|
|
140
|
+
"button:has-text('清华大学')",
|
|
141
|
+
"[role='button']:has-text('Tsinghua')",
|
|
142
|
+
"li:has-text('Tsinghua')",
|
|
143
|
+
"li:has-text('清华')",
|
|
144
|
+
),
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
ACM_PROFILE = PublisherProfile(
|
|
148
|
+
name="ACM",
|
|
149
|
+
article_url_template="https://dl.acm.org/doi/{doi}",
|
|
150
|
+
pdf_url_templates=(
|
|
151
|
+
"https://dl.acm.org/doi/pdf/{doi}",
|
|
152
|
+
),
|
|
153
|
+
success_url_markers=("dl.acm.org/doi/",),
|
|
154
|
+
auth_url_markers=(
|
|
155
|
+
"login.openathens.net",
|
|
156
|
+
"dl.acm.org/action/showLogin",
|
|
157
|
+
"/saml/",
|
|
158
|
+
"/sso/",
|
|
159
|
+
"/login",
|
|
160
|
+
),
|
|
161
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
162
|
+
sso_text_markers=(
|
|
163
|
+
"institutional login",
|
|
164
|
+
"log in through your institution",
|
|
165
|
+
"log in via your institution",
|
|
166
|
+
"access through your institution",
|
|
167
|
+
"openathens",
|
|
168
|
+
),
|
|
169
|
+
aliases=("acm", "association-for-computing-machinery"),
|
|
170
|
+
doi_prefixes=("10.1145", "10.5555"),
|
|
171
|
+
sample_dois=("10.1145/3448016.3452834",),
|
|
172
|
+
base_domains=("dl.acm.org", "acm.org"),
|
|
173
|
+
pdf_url_markers=("/doi/pdf/", "pdf"),
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
APS_PROFILE = PublisherProfile(
|
|
177
|
+
name="APS",
|
|
178
|
+
article_url_template="https://link.aps.org/doi/{doi}",
|
|
179
|
+
pdf_url_templates=(
|
|
180
|
+
"https://link.aps.org/pdf/{doi}",
|
|
181
|
+
),
|
|
182
|
+
success_url_markers=("link.aps.org/doi/", "journals.aps.org/prl/abstract/", "journals.aps.org/prl/pdf/"),
|
|
183
|
+
auth_url_markers=(
|
|
184
|
+
"connect.openathens.net",
|
|
185
|
+
"login.openathens.net",
|
|
186
|
+
"journals.aps.org/login",
|
|
187
|
+
"journals.aps.org/account",
|
|
188
|
+
"/saml/",
|
|
189
|
+
"/sso/",
|
|
190
|
+
"/login",
|
|
191
|
+
),
|
|
192
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
193
|
+
sso_text_markers=(
|
|
194
|
+
"institutional login",
|
|
195
|
+
"log in through your institution",
|
|
196
|
+
"log in via your institution",
|
|
197
|
+
"access through your institution",
|
|
198
|
+
"provided by your institution",
|
|
199
|
+
"openathens",
|
|
200
|
+
),
|
|
201
|
+
aliases=("aps", "american-physical-society"),
|
|
202
|
+
doi_prefixes=("10.1103",),
|
|
203
|
+
sample_dois=("10.1103/PhysRevLett.128.161102",),
|
|
204
|
+
base_domains=("journals.aps.org", "link.aps.org"),
|
|
205
|
+
pdf_url_markers=("/pdf/", "/pdf", "pdf"),
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
ANNUAL_REVIEWS_PROFILE = PublisherProfile(
|
|
209
|
+
name="Annual Reviews",
|
|
210
|
+
article_url_template="https://annualreviews.org/doi/{doi}",
|
|
211
|
+
pdf_url_templates=(
|
|
212
|
+
"https://annualreviews.org/doi/pdf/{doi}",
|
|
213
|
+
),
|
|
214
|
+
success_url_markers=("annualreviews.org/doi/", "annualreviews.org/content/journals/"),
|
|
215
|
+
auth_url_markers=(
|
|
216
|
+
"login.openathens.net",
|
|
217
|
+
"/action/showLogin",
|
|
218
|
+
"/saml/",
|
|
219
|
+
"/sso/",
|
|
220
|
+
"/login",
|
|
221
|
+
),
|
|
222
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
223
|
+
sso_text_markers=(
|
|
224
|
+
"institutional login",
|
|
225
|
+
"institutional sign in",
|
|
226
|
+
"log in through your institution",
|
|
227
|
+
"access through your institution",
|
|
228
|
+
"openathens",
|
|
229
|
+
),
|
|
230
|
+
aliases=("annual-reviews", "annualreviews"),
|
|
231
|
+
doi_prefixes=("10.1146",),
|
|
232
|
+
sample_dois=("10.1146/annurev-phyto-011325-012824",),
|
|
233
|
+
base_domains=("annualreviews.org",),
|
|
234
|
+
pdf_url_markers=("/doi/pdf/", "pdf"),
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
FRONTIERS_PROFILE = PublisherProfile(
|
|
238
|
+
name="Frontiers",
|
|
239
|
+
article_url_template="https://doi.org/{doi}",
|
|
240
|
+
pdf_url_templates=(
|
|
241
|
+
"https://www.frontiersin.org/articles/{doi}/pdf",
|
|
242
|
+
),
|
|
243
|
+
success_url_markers=("frontiersin.org/articles/",),
|
|
244
|
+
auth_url_markers=(
|
|
245
|
+
"login.openathens.net",
|
|
246
|
+
"/saml/",
|
|
247
|
+
"/sso/",
|
|
248
|
+
"/login",
|
|
249
|
+
),
|
|
250
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
251
|
+
sso_text_markers=(
|
|
252
|
+
"institutional login",
|
|
253
|
+
"institutional access",
|
|
254
|
+
"log in through your institution",
|
|
255
|
+
"access through your institution",
|
|
256
|
+
"openathens",
|
|
257
|
+
),
|
|
258
|
+
aliases=("frontiers",),
|
|
259
|
+
doi_prefixes=("10.3389",),
|
|
260
|
+
sample_dois=("10.3389/fmicb.2026.1831710",),
|
|
261
|
+
base_domains=("www.frontiersin.org", "frontiersin.org"),
|
|
262
|
+
pdf_url_markers=("/pdf", "pdf"),
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
WILEY_PROFILE = PublisherProfile(
|
|
266
|
+
name="Wiley",
|
|
267
|
+
article_url_template="https://onlinelibrary.wiley.com/doi/{doi}",
|
|
268
|
+
pdf_url_templates=(
|
|
269
|
+
"https://onlinelibrary.wiley.com/doi/pdfdirect/{doi}",
|
|
270
|
+
"https://onlinelibrary.wiley.com/doi/pdf/{doi}",
|
|
271
|
+
"https://onlinelibrary.wiley.com/doi/epdf/{doi}",
|
|
272
|
+
),
|
|
273
|
+
success_url_markers=("onlinelibrary.wiley.com/doi/",),
|
|
274
|
+
auth_url_markers=(
|
|
275
|
+
"login.openathens.net",
|
|
276
|
+
"/action/showlogin",
|
|
277
|
+
"/login",
|
|
278
|
+
"/saml/",
|
|
279
|
+
"/sso/",
|
|
280
|
+
),
|
|
281
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
282
|
+
sso_text_markers=(
|
|
283
|
+
"institutional login",
|
|
284
|
+
"log in through your institution",
|
|
285
|
+
"access through your institution",
|
|
286
|
+
"shibboleth",
|
|
287
|
+
"openathens",
|
|
288
|
+
),
|
|
289
|
+
aliases=("wiley", "wiley-online-library", "onlinelibrary"),
|
|
290
|
+
doi_prefixes=("10.1002", "10.1111"),
|
|
291
|
+
sample_dois=("10.1002/adfm.202525261", "10.1002/adfm.76235"),
|
|
292
|
+
base_domains=("onlinelibrary.wiley.com",),
|
|
293
|
+
pdf_url_markers=("/doi/pdf/", "/doi/epdf/", "/doi/pdfdirect/", "pdf"),
|
|
294
|
+
supplementary_url_markers=(
|
|
295
|
+
"suppl_file",
|
|
296
|
+
"suppdata",
|
|
297
|
+
"supporting-information",
|
|
298
|
+
"supplementary",
|
|
299
|
+
"/pb-assets/",
|
|
300
|
+
"wechat-wiley-chem",
|
|
301
|
+
),
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
ELSEVIER_PROFILE = PublisherProfile(
|
|
305
|
+
name="Elsevier",
|
|
306
|
+
article_url_template="https://doi.org/{doi}",
|
|
307
|
+
pdf_url_templates=(),
|
|
308
|
+
success_url_markers=(
|
|
309
|
+
"linkinghub.elsevier.com/retrieve/pii",
|
|
310
|
+
"sciencedirect.com/science/article/",
|
|
311
|
+
"elsevier.com/",
|
|
312
|
+
),
|
|
313
|
+
auth_url_markers=(
|
|
314
|
+
"login.elsevier.com",
|
|
315
|
+
"id.elsevier.com",
|
|
316
|
+
"login.openathens.net",
|
|
317
|
+
"/saml/",
|
|
318
|
+
"/sso/",
|
|
319
|
+
"/login",
|
|
320
|
+
),
|
|
321
|
+
auth_title_markers=("OpenAthens", "Sign in", "Login", "Identity"),
|
|
322
|
+
sso_text_markers=(
|
|
323
|
+
"institutional sign in",
|
|
324
|
+
"sign in via your institution",
|
|
325
|
+
"access through your organization",
|
|
326
|
+
"access through your institution",
|
|
327
|
+
"openathens",
|
|
328
|
+
),
|
|
329
|
+
aliases=("elsevier", "sciencedirect", "science-direct"),
|
|
330
|
+
doi_prefixes=("10.1016",),
|
|
331
|
+
sample_dois=("10.1016/j.watres.2024.121507",),
|
|
332
|
+
base_domains=("www.sciencedirect.com", "sciencedirect.com", "linkinghub.elsevier.com"),
|
|
333
|
+
pdf_url_markers=("/pdfft", "/pdf", "download", "pdf"),
|
|
334
|
+
supplementary_url_markers=(
|
|
335
|
+
"suppl_file",
|
|
336
|
+
"suppdata",
|
|
337
|
+
"supporting-information",
|
|
338
|
+
"supplementary",
|
|
339
|
+
"/content/image/",
|
|
340
|
+
"-mmc",
|
|
341
|
+
"_mmc",
|
|
342
|
+
),
|
|
343
|
+
institution_input_selectors=(
|
|
344
|
+
"input[type='search']",
|
|
345
|
+
"input[type='text']",
|
|
346
|
+
"input",
|
|
347
|
+
),
|
|
348
|
+
institution_result_selectors=(
|
|
349
|
+
"button:has-text('清华大学')",
|
|
350
|
+
"button:has-text('Tsinghua University')",
|
|
351
|
+
"[role='button']:has-text('Tsinghua')",
|
|
352
|
+
"li:has-text('Tsinghua')",
|
|
353
|
+
),
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
IEEE_PROFILE = PublisherProfile(
|
|
357
|
+
name="IEEE",
|
|
358
|
+
article_url_template="https://doi.org/{doi}",
|
|
359
|
+
pdf_url_templates=(),
|
|
360
|
+
success_url_markers=("ieeexplore.ieee.org/document/",),
|
|
361
|
+
auth_url_markers=(
|
|
362
|
+
"login.openathens.net",
|
|
363
|
+
"ieeexplore.ieee.org/servlet/wayf",
|
|
364
|
+
"/saml/",
|
|
365
|
+
"/sso/",
|
|
366
|
+
"/login",
|
|
367
|
+
),
|
|
368
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
369
|
+
sso_text_markers=(
|
|
370
|
+
"institutional login",
|
|
371
|
+
"institutional access",
|
|
372
|
+
"log in through your institution",
|
|
373
|
+
"access through your institution",
|
|
374
|
+
"openathens",
|
|
375
|
+
),
|
|
376
|
+
aliases=("ieee", "ieee-xplore"),
|
|
377
|
+
doi_prefixes=("10.1109",),
|
|
378
|
+
sample_dois=("10.1109/jstqe.2026.3687110",),
|
|
379
|
+
base_domains=("ieeexplore.ieee.org", "ieee.org"),
|
|
380
|
+
pdf_url_markers=("stampPDF", "getPDF", "pdf"),
|
|
381
|
+
institution_input_selectors=(
|
|
382
|
+
"input[aria-label='Search for your Institution']",
|
|
383
|
+
"input[aria-label*='Institution']",
|
|
384
|
+
"input.inst-typeahead-input",
|
|
385
|
+
"xpath=(//*[normalize-space()='Search for your Institution']/following::input[1])",
|
|
386
|
+
),
|
|
387
|
+
institution_result_selectors=(
|
|
388
|
+
"button:has-text('Tsinghua University')",
|
|
389
|
+
"[role='button']:has-text('Tsinghua University')",
|
|
390
|
+
"[role='option']:has-text('Tsinghua University')",
|
|
391
|
+
"li:has-text('Tsinghua University')",
|
|
392
|
+
),
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
IOP_PROFILE = PublisherProfile(
|
|
396
|
+
name="IOP",
|
|
397
|
+
article_url_template="https://iopscience.iop.org/article/{doi}",
|
|
398
|
+
pdf_url_templates=(
|
|
399
|
+
"https://iopscience.iop.org/article/{doi}/pdf",
|
|
400
|
+
),
|
|
401
|
+
success_url_markers=("iopscience.iop.org/article/",),
|
|
402
|
+
auth_url_markers=(
|
|
403
|
+
"myiopscience.iop.org/signin",
|
|
404
|
+
"connect.openathens.net",
|
|
405
|
+
"login.openathens.net",
|
|
406
|
+
"sesame.cld.iop.org",
|
|
407
|
+
"/saml/",
|
|
408
|
+
"/sso/",
|
|
409
|
+
"/login",
|
|
410
|
+
),
|
|
411
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
412
|
+
sso_text_markers=(
|
|
413
|
+
"institutional login",
|
|
414
|
+
"log in through your institution",
|
|
415
|
+
"access through your institution",
|
|
416
|
+
"access this article",
|
|
417
|
+
"openathens",
|
|
418
|
+
),
|
|
419
|
+
aliases=("iop", "iopscience"),
|
|
420
|
+
doi_prefixes=("10.1088",),
|
|
421
|
+
sample_dois=("10.1088/1361-648x/ae72dd",),
|
|
422
|
+
base_domains=("iopscience.iop.org",),
|
|
423
|
+
pdf_url_markers=("/pdf", "pdf"),
|
|
424
|
+
institution_input_selectors=(
|
|
425
|
+
"input[type='search']",
|
|
426
|
+
"input[type='text']",
|
|
427
|
+
"input",
|
|
428
|
+
),
|
|
429
|
+
institution_result_selectors=(
|
|
430
|
+
"button:has-text('Tsinghua University')",
|
|
431
|
+
"button:has-text('清华大学')",
|
|
432
|
+
"[role='button']:has-text('Tsinghua')",
|
|
433
|
+
"[role='option']:has-text('Tsinghua')",
|
|
434
|
+
"li:has-text('Tsinghua')",
|
|
435
|
+
),
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
RSC_PROFILE = PublisherProfile(
|
|
439
|
+
name="RSC",
|
|
440
|
+
article_url_template="https://doi.org/{doi}",
|
|
441
|
+
pdf_url_templates=(
|
|
442
|
+
"https://pubs.rsc.org/en/content/articlepdf/{doi}",
|
|
443
|
+
),
|
|
444
|
+
success_url_markers=("pubs.rsc.org/",),
|
|
445
|
+
auth_url_markers=(
|
|
446
|
+
"login.openathens.net",
|
|
447
|
+
"pubs.rsc.org/en/account",
|
|
448
|
+
"/saml/",
|
|
449
|
+
"/sso/",
|
|
450
|
+
"/login",
|
|
451
|
+
),
|
|
452
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
453
|
+
sso_text_markers=(
|
|
454
|
+
"institutional login",
|
|
455
|
+
"log in through your institution",
|
|
456
|
+
"access through your institution",
|
|
457
|
+
"openathens",
|
|
458
|
+
),
|
|
459
|
+
aliases=("rsc", "royal-society-of-chemistry"),
|
|
460
|
+
doi_prefixes=("10.1039",),
|
|
461
|
+
sample_dois=("10.1039/d5cp03829d", "10.1039/d5nj03688g"),
|
|
462
|
+
base_domains=("pubs.rsc.org",),
|
|
463
|
+
pdf_source_path_templates=(
|
|
464
|
+
PdfSourcePathTemplate(
|
|
465
|
+
domain="pubs.rsc.org",
|
|
466
|
+
path_prefix="/en/content/articlelanding/",
|
|
467
|
+
path_template="/en/content/articlepdf/{source_path_after_prefix}",
|
|
468
|
+
),
|
|
469
|
+
),
|
|
470
|
+
pdf_url_markers=("/content/articlepdf/", "/pdf", "download", "pdf"),
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
SPRINGER_PROFILE = PublisherProfile(
|
|
474
|
+
name="Springer Nature",
|
|
475
|
+
article_url_template="https://doi.org/{doi}",
|
|
476
|
+
pdf_url_templates=(
|
|
477
|
+
"https://link.springer.com/content/pdf/{doi_quoted}.pdf",
|
|
478
|
+
"https://www.nature.com/articles/{doi_suffix}.pdf",
|
|
479
|
+
),
|
|
480
|
+
success_url_markers=("link.springer.com/article/", "nature.com/articles/"),
|
|
481
|
+
auth_url_markers=(
|
|
482
|
+
"login.openathens.net",
|
|
483
|
+
"wayf.springernature.com",
|
|
484
|
+
"/saml/",
|
|
485
|
+
"/sso/",
|
|
486
|
+
"/login",
|
|
487
|
+
),
|
|
488
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Sign in", "Login", "Identity"),
|
|
489
|
+
sso_text_markers=(
|
|
490
|
+
"institutional login",
|
|
491
|
+
"log in through your institution",
|
|
492
|
+
"access through your institution",
|
|
493
|
+
"openathens",
|
|
494
|
+
),
|
|
495
|
+
aliases=("springer", "springer-nature", "nature"),
|
|
496
|
+
doi_prefixes=("10.1007", "10.1038"),
|
|
497
|
+
sample_dois=("10.1038/s41586-020-2649-2",),
|
|
498
|
+
base_domains=("link.springer.com", "www.nature.com", "nature.com"),
|
|
499
|
+
pdf_source_path_templates=(
|
|
500
|
+
PdfSourcePathTemplate(
|
|
501
|
+
domain="link.springer.com",
|
|
502
|
+
path_prefix="/article/",
|
|
503
|
+
path_template="/content/pdf/{doi_quoted}.pdf",
|
|
504
|
+
),
|
|
505
|
+
PdfSourcePathTemplate(
|
|
506
|
+
domain="nature.com",
|
|
507
|
+
path_prefix="/articles/",
|
|
508
|
+
path_template="{source_path}.pdf",
|
|
509
|
+
),
|
|
510
|
+
),
|
|
511
|
+
pdf_url_markers=("/content/pdf/", ".pdf", "pdf"),
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
WORLD_SCIENTIFIC_PROFILE = PublisherProfile(
|
|
515
|
+
name="World Scientific",
|
|
516
|
+
article_url_template="https://www.worldscientific.com/doi/{doi}",
|
|
517
|
+
pdf_url_templates=(
|
|
518
|
+
"https://www.worldscientific.com/doi/pdf/{doi}",
|
|
519
|
+
),
|
|
520
|
+
success_url_markers=("worldscientific.com/doi/",),
|
|
521
|
+
auth_url_markers=(
|
|
522
|
+
"login.openathens.net",
|
|
523
|
+
"/action/showLogin",
|
|
524
|
+
"/saml/",
|
|
525
|
+
"/sso/",
|
|
526
|
+
"/login",
|
|
527
|
+
),
|
|
528
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
529
|
+
sso_text_markers=(
|
|
530
|
+
"institutional login",
|
|
531
|
+
"log in through your institution",
|
|
532
|
+
"access through your institution",
|
|
533
|
+
"openathens",
|
|
534
|
+
),
|
|
535
|
+
aliases=("world-scientific", "worldscientific"),
|
|
536
|
+
doi_prefixes=("10.1142",),
|
|
537
|
+
sample_dois=("10.1142/s0218194026500348",),
|
|
538
|
+
base_domains=("www.worldscientific.com", "worldscientific.com"),
|
|
539
|
+
pdf_url_markers=("/doi/pdf/", "pdf"),
|
|
540
|
+
institution_input_selectors=(
|
|
541
|
+
"input[placeholder='Type the name of your institution']",
|
|
542
|
+
"input[placeholder*='institution']",
|
|
543
|
+
"input[type='text']",
|
|
544
|
+
"input",
|
|
545
|
+
),
|
|
546
|
+
institution_result_selectors=(
|
|
547
|
+
"button:has-text('Tsinghua University')",
|
|
548
|
+
"a:has-text('Tsinghua University')",
|
|
549
|
+
"[role='option']:has-text('Tsinghua')",
|
|
550
|
+
".ui-menu-item:has-text('Tsinghua')",
|
|
551
|
+
"li:has-text('Tsinghua')",
|
|
552
|
+
),
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
AIP_PROFILE = PublisherProfile(
|
|
556
|
+
name="AIP Publishing",
|
|
557
|
+
article_url_template="https://pubs.aip.org/doi/{doi}",
|
|
558
|
+
pdf_url_templates=(
|
|
559
|
+
"https://pubs.aip.org/doi/epdf/{doi}",
|
|
560
|
+
"https://pubs.aip.org/doi/pdf/{doi}",
|
|
561
|
+
),
|
|
562
|
+
success_url_markers=("pubs.aip.org/doi/", "pubs.aip.org/"),
|
|
563
|
+
auth_url_markers=(
|
|
564
|
+
"login.openathens.net",
|
|
565
|
+
"/action/showLogin",
|
|
566
|
+
"/saml/",
|
|
567
|
+
"/sso/",
|
|
568
|
+
"/login",
|
|
569
|
+
),
|
|
570
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
571
|
+
sso_text_markers=(
|
|
572
|
+
"institutional login",
|
|
573
|
+
"log in through your institution",
|
|
574
|
+
"access through your institution",
|
|
575
|
+
"openathens",
|
|
576
|
+
),
|
|
577
|
+
aliases=("aip", "aip-publishing", "american-institute-of-physics"),
|
|
578
|
+
doi_prefixes=("10.1063",),
|
|
579
|
+
sample_dois=("10.1063/5.0237567",),
|
|
580
|
+
base_domains=("pubs.aip.org",),
|
|
581
|
+
pdf_url_markers=("/doi/epdf/", "/doi/pdf/", "pdf"),
|
|
582
|
+
supplementary_url_markers=(
|
|
583
|
+
"supplementary",
|
|
584
|
+
"supplemental",
|
|
585
|
+
"supporting-information",
|
|
586
|
+
"suppl_file",
|
|
587
|
+
),
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
AMS_PROFILE = PublisherProfile(
|
|
591
|
+
name="AMS",
|
|
592
|
+
article_url_template="https://journals.ametsoc.org/doi/{doi}",
|
|
593
|
+
pdf_url_templates=(
|
|
594
|
+
"https://journals.ametsoc.org/doi/epdf/{doi}",
|
|
595
|
+
"https://journals.ametsoc.org/doi/pdf/{doi}",
|
|
596
|
+
),
|
|
597
|
+
success_url_markers=("journals.ametsoc.org/",),
|
|
598
|
+
auth_url_markers=(
|
|
599
|
+
"login.openathens.net",
|
|
600
|
+
"/action/showLogin",
|
|
601
|
+
"/saml/",
|
|
602
|
+
"/sso/",
|
|
603
|
+
"/login",
|
|
604
|
+
),
|
|
605
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
606
|
+
sso_text_markers=(
|
|
607
|
+
"institutional login",
|
|
608
|
+
"log in through your institution",
|
|
609
|
+
"access through your institution",
|
|
610
|
+
"openathens",
|
|
611
|
+
),
|
|
612
|
+
aliases=("ams", "ametsoc", "american-meteorological-society"),
|
|
613
|
+
doi_prefixes=("10.1175",),
|
|
614
|
+
sample_dois=("10.1175/aies-d-23-0093.1",),
|
|
615
|
+
base_domains=("journals.ametsoc.org", "ametsoc.org"),
|
|
616
|
+
pdf_url_markers=("/doi/epdf/", "/doi/pdf/", "pdf"),
|
|
617
|
+
supplementary_url_markers=(
|
|
618
|
+
"supplementary",
|
|
619
|
+
"supplemental",
|
|
620
|
+
"supporting-information",
|
|
621
|
+
"suppl_file",
|
|
622
|
+
),
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
COPERNICUS_PROFILE = PublisherProfile(
|
|
626
|
+
name="Copernicus",
|
|
627
|
+
article_url_template="https://doi.org/{doi}",
|
|
628
|
+
pdf_url_templates=(),
|
|
629
|
+
success_url_markers=(".copernicus.org/articles/", "copernicus.org/articles/"),
|
|
630
|
+
auth_url_markers=(),
|
|
631
|
+
auth_title_markers=(),
|
|
632
|
+
sso_text_markers=(),
|
|
633
|
+
aliases=("copernicus", "copernicus-publications"),
|
|
634
|
+
doi_prefixes=("10.5194",),
|
|
635
|
+
sample_dois=("10.5194/acp-24-1-2024",),
|
|
636
|
+
base_domains=("copernicus.org",),
|
|
637
|
+
pdf_url_markers=(".pdf", "/articles/", "pdf"),
|
|
638
|
+
supplementary_url_markers=("assets", "supplement", "supplementary"),
|
|
639
|
+
)
|
|
640
|
+
|
|
641
|
+
MDPI_PROFILE = PublisherProfile(
|
|
642
|
+
name="MDPI",
|
|
643
|
+
article_url_template="https://doi.org/{doi}",
|
|
644
|
+
pdf_url_templates=(),
|
|
645
|
+
success_url_markers=("mdpi.com/",),
|
|
646
|
+
auth_url_markers=(),
|
|
647
|
+
auth_title_markers=(),
|
|
648
|
+
sso_text_markers=(),
|
|
649
|
+
aliases=("mdpi", "mdpi-ag"),
|
|
650
|
+
doi_prefixes=("10.3390",),
|
|
651
|
+
sample_dois=("10.3390/foods10081757",),
|
|
652
|
+
base_domains=("www.mdpi.com", "mdpi.com"),
|
|
653
|
+
pdf_url_markers=("/pdf", "pdf"),
|
|
654
|
+
supplementary_url_markers=("supplementary", "supplement", "/s1", "table-s", "figure-s"),
|
|
655
|
+
)
|
|
656
|
+
|
|
657
|
+
OXFORD_ACADEMIC_PROFILE = PublisherProfile(
|
|
658
|
+
name="Oxford Academic",
|
|
659
|
+
article_url_template="https://doi.org/{doi}",
|
|
660
|
+
pdf_url_templates=(
|
|
661
|
+
"https://academic.oup.com/doi/pdf/{doi}",
|
|
662
|
+
"https://academic.oup.com/doi/epdf/{doi}",
|
|
663
|
+
),
|
|
664
|
+
success_url_markers=("academic.oup.com/",),
|
|
665
|
+
auth_url_markers=(
|
|
666
|
+
"login.openathens.net",
|
|
667
|
+
"/saml/",
|
|
668
|
+
"/sso/",
|
|
669
|
+
"/login",
|
|
670
|
+
"/my-account/login",
|
|
671
|
+
),
|
|
672
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
673
|
+
sso_text_markers=(
|
|
674
|
+
"institutional login",
|
|
675
|
+
"log in through your institution",
|
|
676
|
+
"access through your institution",
|
|
677
|
+
"openathens",
|
|
678
|
+
),
|
|
679
|
+
aliases=("oxfordacademic", "oxford-academic", "oup", "oxford-university-press"),
|
|
680
|
+
doi_prefixes=("10.1093",),
|
|
681
|
+
sample_dois=("10.1093/nar/gkaa892",),
|
|
682
|
+
base_domains=("academic.oup.com",),
|
|
683
|
+
pdf_url_markers=("/doi/pdf/", "/doi/epdf/", "/article-pdf/", "pdf"),
|
|
684
|
+
supplementary_url_markers=("supplementary", "supplement", "suppl_file"),
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
PLOS_PROFILE = PublisherProfile(
|
|
688
|
+
name="PLOS",
|
|
689
|
+
article_url_template="https://doi.org/{doi}",
|
|
690
|
+
pdf_url_templates=(),
|
|
691
|
+
success_url_markers=("journals.plos.org/",),
|
|
692
|
+
auth_url_markers=(),
|
|
693
|
+
auth_title_markers=(),
|
|
694
|
+
sso_text_markers=(),
|
|
695
|
+
aliases=("plos", "public-library-of-science"),
|
|
696
|
+
doi_prefixes=("10.1371",),
|
|
697
|
+
sample_dois=("10.1371/journal.pone.0000001",),
|
|
698
|
+
base_domains=("journals.plos.org", "plos.org"),
|
|
699
|
+
pdf_url_markers=("type=printable", "/article/file", "pdf"),
|
|
700
|
+
supplementary_url_markers=("type=supplementary", "supplementary", "figure/image", "thumbnail"),
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
PNAS_PROFILE = PublisherProfile(
|
|
704
|
+
name="PNAS",
|
|
705
|
+
article_url_template="https://www.pnas.org/doi/{doi}",
|
|
706
|
+
pdf_url_templates=(
|
|
707
|
+
"https://www.pnas.org/doi/epdf/{doi}",
|
|
708
|
+
"https://www.pnas.org/doi/pdf/{doi}?download=true",
|
|
709
|
+
"https://www.pnas.org/doi/pdf/{doi}",
|
|
710
|
+
),
|
|
711
|
+
success_url_markers=("pnas.org/doi/", "www.pnas.org/doi/"),
|
|
712
|
+
auth_url_markers=(
|
|
713
|
+
"login.openathens.net",
|
|
714
|
+
"/action/showLogin",
|
|
715
|
+
"/saml/",
|
|
716
|
+
"/sso/",
|
|
717
|
+
"/login",
|
|
718
|
+
),
|
|
719
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
720
|
+
sso_text_markers=(
|
|
721
|
+
"institutional login",
|
|
722
|
+
"log in through your institution",
|
|
723
|
+
"access through your institution",
|
|
724
|
+
"openathens",
|
|
725
|
+
),
|
|
726
|
+
aliases=("pnas", "proceedings-national-academy-sciences"),
|
|
727
|
+
doi_prefixes=("10.1073",),
|
|
728
|
+
sample_dois=("10.1073/pnas.2309123120",),
|
|
729
|
+
base_domains=("www.pnas.org", "pnas.org"),
|
|
730
|
+
pdf_url_markers=("/doi/epdf/", "/doi/pdf/", "download=true", "pdf"),
|
|
731
|
+
supplementary_url_markers=("supplementary", "suppl_file", "supporting-information"),
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
ROYAL_SOCIETY_PUBLISHING_PROFILE = PublisherProfile(
|
|
735
|
+
name="Royal Society Publishing",
|
|
736
|
+
article_url_template="https://royalsocietypublishing.org/doi/{doi}",
|
|
737
|
+
pdf_url_templates=(
|
|
738
|
+
"https://royalsocietypublishing.org/doi/pdf/{doi}",
|
|
739
|
+
),
|
|
740
|
+
success_url_markers=("royalsocietypublishing.org/doi/",),
|
|
741
|
+
auth_url_markers=(
|
|
742
|
+
"login.openathens.net",
|
|
743
|
+
"/action/showLogin",
|
|
744
|
+
"/saml/",
|
|
745
|
+
"/sso/",
|
|
746
|
+
"/login",
|
|
747
|
+
),
|
|
748
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
749
|
+
sso_text_markers=(
|
|
750
|
+
"institutional login",
|
|
751
|
+
"log in through your institution",
|
|
752
|
+
"access through your institution",
|
|
753
|
+
"openathens",
|
|
754
|
+
),
|
|
755
|
+
aliases=("royalsocietypublishing", "royal-society-publishing", "the-royal-society"),
|
|
756
|
+
doi_prefixes=("10.1098",),
|
|
757
|
+
sample_dois=("10.1098/rsos.150470",),
|
|
758
|
+
base_domains=("royalsocietypublishing.org",),
|
|
759
|
+
pdf_url_markers=("/doi/pdf/", "pdf"),
|
|
760
|
+
supplementary_url_markers=("supplementary", "supplement", "suppl_file"),
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
SCIENCE_PROFILE = PublisherProfile(
|
|
764
|
+
name="Science",
|
|
765
|
+
article_url_template="https://www.science.org/doi/{doi}",
|
|
766
|
+
pdf_url_templates=(
|
|
767
|
+
"https://www.science.org/doi/epdf/{doi}",
|
|
768
|
+
"https://www.science.org/doi/pdf/{doi}",
|
|
769
|
+
"https://www.science.org/doi/pdf/{doi}?download=true",
|
|
770
|
+
),
|
|
771
|
+
success_url_markers=("science.org/doi/", "www.science.org/doi/"),
|
|
772
|
+
auth_url_markers=(
|
|
773
|
+
"login.openathens.net",
|
|
774
|
+
"/action/showLogin",
|
|
775
|
+
"/saml/",
|
|
776
|
+
"/sso/",
|
|
777
|
+
"/login",
|
|
778
|
+
),
|
|
779
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Login", "Identity"),
|
|
780
|
+
sso_text_markers=(
|
|
781
|
+
"institutional login",
|
|
782
|
+
"log in through your institution",
|
|
783
|
+
"access through your institution",
|
|
784
|
+
"openathens",
|
|
785
|
+
),
|
|
786
|
+
aliases=("science", "aaas", "american-association-for-the-advancement-of-science"),
|
|
787
|
+
doi_prefixes=("10.1126",),
|
|
788
|
+
sample_dois=("10.1126/sciadv.adp3964",),
|
|
789
|
+
base_domains=("www.science.org", "science.org"),
|
|
790
|
+
pdf_url_markers=("/doi/epdf/", "/doi/pdf/", "download=true", "pdf"),
|
|
791
|
+
supplementary_url_markers=("supplementary", "supplement", "suppl_file"),
|
|
792
|
+
)
|
|
793
|
+
|
|
794
|
+
OPTICA_PROFILE = PublisherProfile(
|
|
795
|
+
name="Optica",
|
|
796
|
+
article_url_template="https://doi.org/{doi}",
|
|
797
|
+
# Optica's article id (ol-48-1-57) is not derivable from the DOI, but
|
|
798
|
+
# viewmedia.cfm accepts the DOI itself as uri= (#59).
|
|
799
|
+
pdf_url_templates=(
|
|
800
|
+
"https://opg.optica.org/viewmedia.cfm?r=1&uri={doi}",
|
|
801
|
+
"https://opg.optica.org/viewmedia.cfm?r=1&uri={doi_quoted}",
|
|
802
|
+
),
|
|
803
|
+
success_url_markers=("opg.optica.org",),
|
|
804
|
+
auth_url_markers=(
|
|
805
|
+
"login.openathens.net",
|
|
806
|
+
"opg.optica.org/login",
|
|
807
|
+
"/saml/",
|
|
808
|
+
"/sso/",
|
|
809
|
+
"/login",
|
|
810
|
+
),
|
|
811
|
+
auth_title_markers=("OpenAthens", "Institutional Login", "Sign In", "Login", "Identity"),
|
|
812
|
+
sso_text_markers=(
|
|
813
|
+
"institutional login",
|
|
814
|
+
"sign in via your institution",
|
|
815
|
+
"log in through your institution",
|
|
816
|
+
"access through your institution",
|
|
817
|
+
"access provided by",
|
|
818
|
+
"openathens",
|
|
819
|
+
),
|
|
820
|
+
aliases=("optica", "osa", "opg", "optica-publishing-group", "optical-society-of-america"),
|
|
821
|
+
doi_prefixes=("10.1364",),
|
|
822
|
+
sample_dois=("10.1364/ol.47.013297",),
|
|
823
|
+
base_domains=("opg.optica.org", "optica.org", "osapublishing.org"),
|
|
824
|
+
pdf_url_markers=("viewmedia.cfm", "/pdf", "download", "pdf"),
|
|
825
|
+
institution_input_selectors=(
|
|
826
|
+
"input[type='search']",
|
|
827
|
+
"input[type='text']",
|
|
828
|
+
"input",
|
|
829
|
+
),
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
PUBLISHER_PROFILES = {
|
|
833
|
+
"acs": ACS_PROFILE,
|
|
834
|
+
"aip": AIP_PROFILE,
|
|
835
|
+
"ams": AMS_PROFILE,
|
|
836
|
+
"acm": ACM_PROFILE,
|
|
837
|
+
"annual-reviews": ANNUAL_REVIEWS_PROFILE,
|
|
838
|
+
"aps": APS_PROFILE,
|
|
839
|
+
"copernicus": COPERNICUS_PROFILE,
|
|
840
|
+
"wiley": WILEY_PROFILE,
|
|
841
|
+
"elsevier": ELSEVIER_PROFILE,
|
|
842
|
+
"frontiers": FRONTIERS_PROFILE,
|
|
843
|
+
"ieee": IEEE_PROFILE,
|
|
844
|
+
"iop": IOP_PROFILE,
|
|
845
|
+
"mdpi": MDPI_PROFILE,
|
|
846
|
+
"oxfordacademic": OXFORD_ACADEMIC_PROFILE,
|
|
847
|
+
"optica": OPTICA_PROFILE,
|
|
848
|
+
"plos": PLOS_PROFILE,
|
|
849
|
+
"pnas": PNAS_PROFILE,
|
|
850
|
+
"royalsocietypublishing": ROYAL_SOCIETY_PUBLISHING_PROFILE,
|
|
851
|
+
"rsc": RSC_PROFILE,
|
|
852
|
+
"science": SCIENCE_PROFILE,
|
|
853
|
+
"springer": SPRINGER_PROFILE,
|
|
854
|
+
"world-scientific": WORLD_SCIENTIFIC_PROFILE,
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
_PROFILE_ALIASES = {
|
|
858
|
+
alias.lower(): profile
|
|
859
|
+
for profile in PUBLISHER_PROFILES.values()
|
|
860
|
+
for alias in (profile.name, *profile.aliases)
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
def list_publisher_profiles() -> list[str]:
|
|
865
|
+
"""Return stable publisher profile keys available to deterministic workflows."""
|
|
866
|
+
return sorted(PUBLISHER_PROFILES)
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
def get_publisher_profile(name: str) -> PublisherProfile:
|
|
870
|
+
"""Resolve a publisher profile by key, display name, or alias."""
|
|
871
|
+
key = name.strip().lower()
|
|
872
|
+
profile = PUBLISHER_PROFILES.get(key) or _PROFILE_ALIASES.get(key)
|
|
873
|
+
if profile is None:
|
|
874
|
+
available = ", ".join(list_publisher_profiles())
|
|
875
|
+
raise ValueError(f"Unknown publisher profile '{name}'. Available: {available}")
|
|
876
|
+
return profile
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
def infer_publisher_profile(doi: str) -> PublisherProfile | None:
|
|
880
|
+
"""Infer a likely publisher profile from stable DOI prefixes."""
|
|
881
|
+
normalized = doi.strip().lower()
|
|
882
|
+
for profile in PUBLISHER_PROFILES.values():
|
|
883
|
+
if any(normalized.startswith(prefix.lower()) for prefix in profile.doi_prefixes):
|
|
884
|
+
return profile
|
|
885
|
+
return None
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
def infer_publisher_profile_from_url(url: str) -> PublisherProfile | None:
|
|
889
|
+
"""Infer a publisher profile from a resolved landing or publisher URL."""
|
|
890
|
+
parsed = urlparse(url)
|
|
891
|
+
host = (parsed.hostname or "").lower()
|
|
892
|
+
lower_url = url.lower()
|
|
893
|
+
for profile in PUBLISHER_PROFILES.values():
|
|
894
|
+
domains = profile.base_domains or ()
|
|
895
|
+
if any(host == domain or host.endswith(f".{domain}") for domain in domains):
|
|
896
|
+
return profile
|
|
897
|
+
if any(marker.lower() in lower_url for marker in profile.success_url_markers):
|
|
898
|
+
return profile
|
|
899
|
+
return None
|