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.8.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

ycnbc-1.0.8-py2.py3-none-any.whl (12.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ycnbc-1.0.8.tar.gz
  • Upload date:
  • Size: 12.9 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.8.tar.gz
Algorithm Hash digest
SHA256 b66fd76cb7706458976358192faeda527ceea264e81cf6ee648c8328b056b165
MD5 d97f25fcf40968e614c894b7463040ca
BLAKE2b-256 3471e0c7bafc0b4b71fd2545501c937e55f27de7675a0d57b8d83e7fa491d41f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ycnbc-1.0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b349fb5b0db8ed63ed24daf5c6c925a1a32833f08001cf3ab417039954153008
MD5 66acf86c1afd5844528e4b3e1a63d6a8
BLAKE2b-256 0cc8feb51b7445de30dff434f84d078a4d9e2c31da73119acdca1202320dd20a

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