anaghanagesh commited on
Commit
b1d06f5
·
verified ·
1 Parent(s): 48cc292

Update pubmed.py

Browse files
Files changed (1) hide show
  1. pubmed.py +2 -3
pubmed.py CHANGED
@@ -4,14 +4,14 @@ from Bio import Medline
4
  Entrez.email = "demo@example.com"
5
 
6
 
7
- def search_pubmed(query, max_results=5):
8
 
9
  try:
10
 
11
  handle = Entrez.esearch(
12
  db="pubmed",
13
  term=query,
14
- retmax=max_results
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