Skip to main content

Easily query articles

Project description

NewsDataScrapper

Python package that helps you easily get news data

License: MIT pypi: newsdatascraper

Requirements

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for newsdatascraper, version 0.0.7
Filename, size & hash File type Python version Upload date
newsdatascraper-0.0.7.tar.gz (4.1 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page