Update fetch_data.py
Browse files- fetch_data.py +4 -4
fetch_data.py
CHANGED
@@ -23,17 +23,17 @@ def fetch_data(user_access_key):
|
|
23 |
papers_data['status'] = 'success'
|
24 |
papers_data['data'] = {}
|
25 |
with ThreadPoolExecutor() as executor:
|
26 |
-
arxiv_future = executor.submit(fetch_arxiv_data)
|
27 |
pmc_future = executor.submit(fetch_pmc_data)
|
28 |
-
|
29 |
pmc_data = pmc_future.result()
|
30 |
-
|
|
|
31 |
if topic_data['count'] == 0:
|
32 |
continue
|
33 |
else:
|
34 |
papers_data['data'][topic] = {}
|
35 |
papers_data['data'][topic]['ids'] = topic_data['ids']
|
36 |
-
for topic, topic_data in
|
37 |
if topic_data['count'] == 0:
|
38 |
continue
|
39 |
else:
|
|
|
23 |
papers_data['status'] = 'success'
|
24 |
papers_data['data'] = {}
|
25 |
with ThreadPoolExecutor() as executor:
|
|
|
26 |
pmc_future = executor.submit(fetch_pmc_data)
|
27 |
+
arxiv_future = executor.submit(fetch_arxiv_data)
|
28 |
pmc_data = pmc_future.result()
|
29 |
+
arxiv_data = arxiv_future.result()
|
30 |
+
for topic, topic_data in pmc_data.items():
|
31 |
if topic_data['count'] == 0:
|
32 |
continue
|
33 |
else:
|
34 |
papers_data['data'][topic] = {}
|
35 |
papers_data['data'][topic]['ids'] = topic_data['ids']
|
36 |
+
for topic, topic_data in arxiv_data.items():
|
37 |
if topic_data['count'] == 0:
|
38 |
continue
|
39 |
else:
|