NewsDataScrapper
Python package that helps you easily get news data
Requirements
- Python 3.5+
- Newspaper3k
- Api Key from NewsApi
Installation
pip3 install newsdatascraper
Usage
from newsdatascraper import Scraper
#To first get the articles
new_scraper = Scraper('mock-api-key')
articles = new_scraper.fetch_all_articles(query='two-sigma')
#To access individual articles and their properties
first_article = articles.articles[0]
print(first_article.content)
#We also provide helper functions to serialize the data
articles.toCsv('test.csv')
articles.toPickle('test.pickle')
articles.toJson()
Working on the Project
Run format
black .
Run Linter
pylama -o setup.cfg .
Run tests
pytest
Run tests + code coverage
sh ./scripts/generate_coverage.sh
Metadata
Release files for newsdatascraper 0.0.6
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 |
|---|---|---|---|---|
| newsdatascraper-0.0.6.tar.gz | 4.2 kB | Without provenance | Details for newsdatascraper-0.0.6.tar.gz |
Release files / newsdatascraper-0.0.6.tar.gz
| Download URL | newsdatascraper-0.0.6.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b92aec41d00a4fdfc6a84f1b27ad3130f4b0ddcbf850a410db3b088caaf5b9e8
|
|
BLAKE2b-256 checksum How to use checksums |
6b7ab7a18e01f88bfef479d1cb37276eb8d2030bfb068ce6cb67f89ecb7e007d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Security for newsdatascraper 0.0.6
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.