Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
10d3579
1
Parent(s):
8a428ab
Hang on to the classic database for now, because some works there are missing in the new database
Browse files
app.py
CHANGED
|
@@ -180,7 +180,12 @@ def execute_request(ids: list[str], mailto: str | None) -> list[Work]:
|
|
| 180 |
# query with the /works endpoint with a specific list of IDs and fields
|
| 181 |
search_filter = f"openalex_id:{'|'.join(ids)}"
|
| 182 |
search_select = ",".join(["id"] + Work.get_raw_fields())
|
| 183 |
-
params = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
if mailto is not None:
|
| 185 |
params["mailto"] = mailto
|
| 186 |
response = requests.get("https://api.openalex.org/works", params)
|
|
|
|
| 180 |
# query with the /works endpoint with a specific list of IDs and fields
|
| 181 |
search_filter = f"openalex_id:{'|'.join(ids)}"
|
| 182 |
search_select = ",".join(["id"] + Work.get_raw_fields())
|
| 183 |
+
params = {
|
| 184 |
+
"filter": search_filter,
|
| 185 |
+
"select": search_select,
|
| 186 |
+
"per-page": 100,
|
| 187 |
+
"data-version": 1,
|
| 188 |
+
}
|
| 189 |
if mailto is not None:
|
| 190 |
params["mailto"] = mailto
|
| 191 |
response = requests.get("https://api.openalex.org/works", params)
|