colonelwatch commited on
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
Files changed (1) hide show
  1. app.py +6 -1
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 = {"filter": search_filter, "select": search_select, "per-page": 100}
 
 
 
 
 
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)