固定数量的结果

2024-04-26 18:00:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图通过biopython使用以下代码从pubmed检索搜索结果

from Bio import Entrez
from Bio import Medline

Entrez.email = "A.N.iztb@bobxx.com"
LIM = 3


def search(Term):
    handle = Entrez.esearch(db='pmc', term=Term, retmax=100000000)
    record = Entrez.read(handle)
    idlist = record["IdList"]
    handle = Entrez.efetch(db='pmc', id=idlist, rettype="medline", retmode="text")
    records = Medline.parse(handle)
    return list(records)
mydic=search('(pathological conditions, signs and symptoms[MeSH Terms]) AND (pmc cc license[filter]) ')
print(len(mydic))

不管我试了多少次,我的输出都是10000次。尝试了不同的查询,但我还是得到了10000个。当我通过浏览器手动检查有多少结果时,我会得到随机数。在

到底出了什么问题,如何确保我得到最大的结果?在


Tags: fromimportdbsearchentrezrecordbiobiopython