Python client for text mining levaraging Crossrefs Text and Data Mining service.
Source on GitHub at sckott/pyminer
Other Crossref text mining (and related) clients:
- R: rcrossref, ropensci/rcrossref
- R: crminer, ropensci/crminer
- R: fulltext, ropensci/fulltext
- Ruby: textminer, sckott/textminer
- Python: habanero, sckott/habanero
Stable from pypi
pip install pyminer
Development version
[sudo] pip install git+git://github.com/sckott/pyminer.git#egg=pyminer
Strongly recommend for search using your email in the mailto parameter in the Miner() call to get in the "fast lane".
from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'])
m.search(filter = {'has_full_text': True}, limit = 5)
If you have a Crossref Text and Data Mining key/token, you can give it in the tdmkey parameter in the Miner() call
# a Pensoft article
from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'])
x = m.search(ids = '10.3897/rio.2.e10445')
x
out = x.fetch(type = "pdf")
out
out[0].url
out[0].path
out[0].type
out[0].parse()
# an Elsevier article - BEWARE, they check IP addresses, so your IP address
# must be at a member institution or similar
from pyminer import Miner
import os
m = Miner(mailto = os.environ['crossref_email'], tdmkey = os.environ['CROSSREF_TDM'])
x = m.search(ids = "10.1016/j.funeco.2010.11.003")
out = x.fetch(type = "xml")
out
out[0].path
out[0].parse()
from pyminer import fetch, extract
url = 'http://www.nepjol.info/index.php/JSAN/article/viewFile/13527/10928'
x = fetch(url)
extract(x.path)
- License: MIT, see LICENSE file
- Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.