Ejemplo n.º 1
0
    def testRecentItems(self):
        # Get publications mentioning 'rhodopsin' which were added to
        # PubMed in the last 10 days
        client = DBIdsClient.DBIdsClient(eutils=picklestore.client())
        results = client.search("rhodopsin", daterange=EUtils.WithinNDays(10))

        print
        print "There are", len(
            results), "rhodopsin records from the last 10 days"
        print "The record identifiers are:", ", ".join(map(str, results.dbids))
        print results.efetch(retmode="text", rettype="docsum").read()
Ejemplo n.º 2
0
 def test1(self):
     self.setup()
     # Search in PubMed for the term cancer for the entrez date from the
     # last 60 days and retrieve the first 100 IDs and translations using
     # the history parameter:
     # http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?
     #   db=pubmed&term=cancer&reldate=60&datetype=edat&retmax=100&usehistory=y
     result = self.history_client.search("cancer",
                                         db=EUtils.databases.PUBMED,
                                         daterange=EUtils.WithinNDays(
                                             60, "edat"))
     dbids = result[:100].dbids