Data Collector
By Query
To get the papers data by search query, you can use the following python script,
from datacollector import datacollector_query
# Search for a query, biofilm co2, with 10 results and download the pdf format of the result
datacollector_query('biofilm co2', 10, True)
# Search for a query, biofilm co2, with 10 results and without download the pdf format of the result
datacollector_query('biofilm co2', 10)
In this script, it takes 3 arguments.
- Search Query (Non-empty String)
- Number of results (Integer)
- Download PDF file? (yes/no)
NOTE: For the search query, it must be a non-empty String, and if you want more than one query, using + symbol between two words (Ex. word1+word2). This script will
- Search for the query at the PubMed repository
- Format the result as JSON format
- Name the JSON with paper’s id (Ex. 1234.json)
- Automatucally create a directory (./datasets_query/json) to save the JSON results
- For the pdf file, they will be saved into ./pdf
The JSON file will contain the metadata of the paper
- pmid
- authors
- year
- title
- abstract
- doi
- references
- citedby
If you type yes for the third argument, it also will download the paper with pdf format into the pdf directory from a repository HERE.
NOTE: You might not be able to download some of the paper with pdf format. The reason I have found is first the repository doesn’t have it. Second, the paper hasn't been published yet because it’s too new.
By PMIDs
To get the papers data by list of ids, you can use the following python script,
from datacollector import datacollector_query
# import list of ids with text format, download metadata, and download the pdf format of the result
datacollector_query('./ids_list.txt', True)
# import list of ids with text format, download metadata without downloading the pdf format of the result
datacollector_query('./ids_list.txt')
In this script, it takes 2 arguments.
- File path (TXT format)
- Download PDF file? (yes/no)
This script will do the same things as ABOVE, but with list of pmids, not query. It also will automatically create a directory (./datasets_id/json) to save the JSON results. NOTE: For the TXT file, you must separate those pmids with a new line character (“\n”).
Metadata
Release files for datacollector 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datacollector-0.0.7.tar.gz | 5.0 kB | Without provenance | Details for datacollector-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datacollector-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for datacollector-0.0.7-py3-none-any.whl |
Total release size: 12.7 kB
Release files / datacollector-0.0.7.tar.gz
| Download URL | datacollector-0.0.7.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00c8d758880459721610915bb98868167496c5b5fdb73fbdf2828442df2542a1
|
|
BLAKE2b-256 checksum How to use checksums |
1ada0082a8c334d99177498242b5c661cd9bb79b39885e79bcb9a71f3a56b3e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3
|
Release files / datacollector-0.0.7-py3-none-any.whl
| Download URL | datacollector-0.0.7-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ebbdc3ab8ffa3cae559100015e7d2093c0c938891bf2a4efa3c0deca571094b
|
|
BLAKE2b-256 checksum How to use checksums |
15810fbb21679b2b244da8fed426fc900e5abebc850fd4440414bd06c3ccc635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3
|
Security for datacollector 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.