<div dir="ltr"><div><div>I had the similar need a few years ago and here is what I did:<br><br></div>1. test query usign NCBI PubMED site and my query looks like<br>query = Entrez.esearch(db="pubmed", term='(publisher[sb] AND ("%s"[Date - Publication]:"%s"[Date - Publication])' % (last_update, current), usehistory="y")<br><br></div>2. Process query results to get following parameters for retrieving xml records<br> records=Entrez.read(query)<br> query.close()<br> count = int(records["Count"])<br> webenv = records["WebEnv"]<br> querykey = records["QueryKey"]<br><div><br></div><div>3. Retrieve the abstracts in xml format<br> #To control the size of file using 10000 as limit<br> batch_size = 10000<br><br> if batch_size>=count:<br> ofp=gzip.open("aName.xml.gz" % , 'w')<br> fetch_handle = Entrez.efetch(db="pubmed", rettype="MEDLINE", retmode="xml", retstart=0, retmax=batch_size, webenv=webenv, query_key=querykey)<br> data = fetch_handle.read()<br> fetch_handle.close()<br> ofp.write(data)<br> ofp.close()<br> else:<br> num=count/batch_size+1<br> for i in range(num):<br> ofp=gzip.open("PubMed_%s.xml.gz" % i, 'w') <br> start = i*batch_size<br> end = min(count, start+batch_size)<br> print "Going to download record %i to %i" % (start+1, end)<br> fetch_handle = Entrez.efetch(db="pubmed", rettype="MEDLINE", retmode="xml", retstart=start, retmax=batch_size, webenv=webenv, query_key=querykey)<br> data = fetch_handle.read()<br> fetch_handle.close()<br> ofp.write(data)<br> ofp.close()<br><br></div><div>Hope it has some useful information.<br></div><div>Ming<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 3, 2015 at 6:38 AM, <span dir="ltr"><<a href="mailto:c.buhtz@posteo.jp" target="_blank">c.buhtz@posteo.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A little bit off-topic.<br>
<br>
I did some search/fetch/analyse with Entrez and and the end I have a<br>
list of PubMed-IDs (e.g. in a text-file, on id per line) - nearly 1000.<br>
<br>
How can I view/display that list on the Pubmed-Website? I mean I want<br>
to search for all PMIDs on the Website and show the result.<br>
<span class="HOEnZb"><font color="#888888">--<br>
GnuPGP-Key ID 0751A8EC<br>
_______________________________________________<br>
Biopython mailing list - <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
</font></span></blockquote></div><br></div>