Paginate \ count result #1
Comments
Hi, If you really need it you can do something like this:
The articles variable in the last example is a generator, so the next request is not made until you're done with this one. I'll try to add some easier helper methods in the next release. I hope that helps? |
Thanks, I think it is a fair enough solution for now but would like to have advanced option such as count without retrieving all the ids, queries based on specific field, etc. |
I'll take care of the count method ;) As for the querying... It's possible to enter any PubMed query (also for specific fields). Try for example something like:
(which will get you all articles published after the first of January 2018 (until now), by you with "PubMed" in the title) Tip: Use the "advanced" query builder on the PubMed website and copy the query to your code for deeper analysis of the articles. |
Super, thanks |
Update: I've added a new method for counting the total number of matching articles (without retrieving any). It's now available in pymed version 0.8.1.
|
Hi,
Is there a way to get count of the relevant results with respect to the query and \ or to paginate the results. E.g. read the first 500, then 500-1000, etc.?
The text was updated successfully, but these errors were encountered: