Skip to main content

Download data from CNBC!

Project description

Download news data from CNBC! CNBC's API

*** IMPORTANT LEGAL DISCLAIMER ***


ycnbc is not affiliated, endorsed, or vetted by CNBC, It's an open source tool that uses Web Scraping and is intended for research and educational purposes.


ycnbc offers a threaded and Pythonic way to news and market data from CNBC.

Changelog »


Quick Start


Requirements

  • Python >=3.5+
  • requests>=2.23.0
  • lxml>=4.5.1

Installation

$ pip install ycnbc --upgrade --no-cache-dir

Usage for Markets

import ycnbc

markets = ycnbc.Markets()

quote_summary = markets.quote_summary('AAPL')
pre_markets = markets.pre_markets()
us_markets = markets.us_markets()
europe_markets = markets.europe_markets()
asia_markets = markets.asia_markets()
currencies = markets.currencies()
cryptocurrencies = markets.cryptocurrencies()
futures_and_commodities = markets.futures_and_commodities()
bonds = markets.bonds()
funds_and_etfs = markets.funds_and_etfs()

Usage for news

import ycnbc

news = ycnbc.News()

# Get trending news
trending_ = news.trending()

# Get latest news
latest_ = news.latest()

# Get news by category
economy_ = news.economy()
jobs_ = news.jobs()
white_house_ = news.white_house()
hospitals_ = news.hospitals()
transportation_ = news.transportation()
media_ = news.media()
internet_ = news.internet()
congress_ = news.congress()
policy_ = news.policy()
finance_ = news.finance()
life_ = news.life()
defense_ = news.defense()
europe_politics_ = news.europe_politics()
china_politics_ = news.china_politics()
asia_politics_ = news.asia_politics()
world_politics_ = news.world_politics()
equity_opportunity_ = news.equity_opportunity()
politics_ = news.politics()
wealth_ = news.wealth()
world_economy_ = news.world_economy()
central_banks_ = news.central_banks()
real_estate_ = news.real_estate()
health_science_ = news.health_science()
small_business_ = news.small_business()
lifehealth_insurance_ = news.lifehealth_insurance()
business_ = news.business()
energy_ = news.energy()
industrials_ = news.industrials()
retail_ = news.retail()
cybersecurity_ = news.cybersecurity()
mobile_ = news.mobile()
technology_ = news.technology()
cnbc_disruptors_ = news.cnbc_disruptors()
tech_guide_ = news.tech_guide()
social_media_ = news.social_media()
climate_ = news.climate()

Note:

  • URL pages containing news content that have the PRO tag still cannot be retrieved using this library.

Legal Stuff

ycnbc is distributed under the Apache Software License. See the LICENSE.txt file in the release for details.


P.S.

Please drop me a note with any feedback you have.

Asep Saputra

Download files

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

Source Distribution

ycnbc-1.0.7.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

ycnbc-1.0.7-py2.py3-none-any.whl (12.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ycnbc-1.0.7.tar.gz.

File metadata

  • Download URL: ycnbc-1.0.7.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for ycnbc-1.0.7.tar.gz
Algorithm Hash digest
SHA256 670d54b9688cc95b4776cf887cfa2e723d642a7a174b86f33b0d629868a1a39c
MD5 90beb2accee90548be44833556de623c
BLAKE2b-256 fd19733ef2e2f6a80bf83ab6e3c07c281c68116a6d9fa42cbfc5f33e8ebbbc8f

See more details on using hashes here.

File details

Details for the file ycnbc-1.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: ycnbc-1.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for ycnbc-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bd81f933333f7cf605cee55f8b66b48e6e46dc93f0b5ec3510d1df283d68d4c9
MD5 5fe9568319df83b8c2c30057dde6c98d
BLAKE2b-256 831ecacaea686f78963518ba30955fabe730b78787b8eadff01d2605ac8eb705

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page