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

import ycnbc

data = ycnbc.News()

# Get trending news
trending_ = data.trending()

# Get latest news
latest_ = data.latest()

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

Uploaded Source

Built Distribution

ycnbc-1.0.6-py2.py3-none-any.whl (11.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: ycnbc-1.0.6.tar.gz
  • Upload date:
  • Size: 10.3 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.6.tar.gz
Algorithm Hash digest
SHA256 901bc86660d303e1c6533d96fa41687e623dd7682429c2225747e5cefbdfb120
MD5 534af321c94d1f1279bb7148e76a89e7
BLAKE2b-256 7e9e8c701c4a6077a0444ed4d11c8a56fb52345cd7b9237422bd72348d8de861

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ycnbc-1.0.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b47da2b8fe34640912fdc3b9bb3c261c1441961389585969315d3d5490e42e4
MD5 f16cb3b5bac9e204d88c9cd161af7df0
BLAKE2b-256 76812e3a9952fcc0c8979bf91e6b0a5a3dc623c64c5c38f7f666ed5180519a9c

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