Spaces:
Sleeping
Sleeping
Update pubmed.py
Browse files
pubmed.py
CHANGED
|
@@ -4,14 +4,14 @@ from Bio import Medline
|
|
| 4 |
Entrez.email = "demo@example.com"
|
| 5 |
|
| 6 |
|
| 7 |
-
def search_pubmed(query
|
| 8 |
|
| 9 |
try:
|
| 10 |
|
| 11 |
handle = Entrez.esearch(
|
| 12 |
db="pubmed",
|
| 13 |
term=query,
|
| 14 |
-
retmax=
|
| 15 |
)
|
| 16 |
|
| 17 |
record = Entrez.read(handle)
|
|
@@ -36,7 +36,6 @@ def search_pubmed(query, max_results=5):
|
|
| 36 |
|
| 37 |
papers.append({
|
| 38 |
"id": article.get("PMID", ""),
|
| 39 |
-
"title": article.get("TI", ""),
|
| 40 |
"abstract": article.get("AB", "")
|
| 41 |
})
|
| 42 |
|
|
|
|
| 4 |
Entrez.email = "demo@example.com"
|
| 5 |
|
| 6 |
|
| 7 |
+
def search_pubmed(query):
|
| 8 |
|
| 9 |
try:
|
| 10 |
|
| 11 |
handle = Entrez.esearch(
|
| 12 |
db="pubmed",
|
| 13 |
term=query,
|
| 14 |
+
retmax=3
|
| 15 |
)
|
| 16 |
|
| 17 |
record = Entrez.read(handle)
|
|
|
|
| 36 |
|
| 37 |
papers.append({
|
| 38 |
"id": article.get("PMID", ""),
|
|
|
|
| 39 |
"abstract": article.get("AB", "")
|
| 40 |
})
|
| 41 |
|