-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch_details.py
More file actions
46 lines (42 loc) · 1.97 KB
/
Copy pathsearch_details.py
File metadata and controls
46 lines (42 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
"""Get details on the most cited recent wildfire papers."""
import urllib.request, urllib.parse, json, time
def get_paper_by_doi(doi):
url = f'https://api.openalex.org/works/doi:{urllib.parse.quote(doi)}'
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read().decode('utf-8'))
def get_abstract(work_id):
url = f'https://api.openalex.org/works/{work_id}?select=abstract_inverted_index'
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read().decode('utf-8'))
papers_of_interest = [
"10.3390/fire8080293", # Generative AI Wildfire Spread
"10.3390/rs17030515", # GNN-LSTM FWI
"10.3390/rs17071267", # Self-Supervised Smoke Plume
"10.1016/j.cacaie.2026.100085", # GNN + DT Building Damage
"10.1016/j.chaos.2026.117944", # Koopman PINNs chaotic
"10.1016/j.srs.2026.100429", # FireCast-fusion
"10.3390/jimaging12060229", # Unsupervised Wildfire MTG
]
for doi in papers_of_interest:
try:
w = get_paper_by_doi(doi)
title = w.get('title', '?')
year = w.get('publication_year', '?')
date = w.get('publication_date', '?')
cited = w.get('cited_by_count', 0)
authors = [a.get('author', {}).get('display_name', '?') for a in w.get('authorships', [])]
loc = w.get('primary_location', {}) or {}
source = loc.get('source', {}) or {}
journal = source.get('display_name', '') or ''
print(f"\n{'='*70}")
print(f"DOI: {doi}")
print(f"Title: {title}")
print(f"Published: {date} | Journal: {journal}")
print(f"Authors: {', '.join(authors[:5])}")
print(f"Cited by: {cited}")
time.sleep(0.3)
except Exception as e:
print(f"\n⚠️ Error for {doi}: {e}")