# Download news data from CNBC! CNBC's API
<table border=1 cellpadding=10><tr><td>
#### \*\*\* 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.
</td></tr></table>
---
**ycnbc** offers a threaded and Pythonic way to news and market data from [CNBC](https://www.cnbc.com).
[Changelog ยป](https://github.com/asepscareer/ycnbc/blob/master/CHANGELOG.rst)
---
## 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
```python
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
```python
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](./LICENSE.txt) file in the release for details.
---
### P.S.
Please drop me a note with any feedback you have.
**Asep Saputra**
Raw data
{
"_id": null,
"home_page": "https://github.com/asepscareer/ycnbc",
"name": "ycnbc",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "scrape news, cnbc library, cnbc python, cnbc api",
"author": "Asep Saputra",
"author_email": "asepscareer@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/34/71/e0c7bafc0b4b71fd2545501c937e55f27de7675a0d57b8d83e7fa491d41f/ycnbc-1.0.8.tar.gz",
"platform": "any",
"description": "# Download news data from CNBC! CNBC's API\r\n\r\n<table border=1 cellpadding=10><tr><td>\r\n\r\n#### \\*\\*\\* IMPORTANT LEGAL DISCLAIMER \\*\\*\\*\r\n\r\n---\r\n\r\nycnbc 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.\r\n</td></tr></table>\r\n\r\n---\r\n\r\n**ycnbc** offers a threaded and Pythonic way to news and market data from [CNBC](https://www.cnbc.com).\r\n\r\n[Changelog \u00bb](https://github.com/asepscareer/ycnbc/blob/master/CHANGELOG.rst)\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n---\r\n### Requirements\r\n\r\n- Python >=3.5+\r\n- requests>=2.23.0\r\n- lxml>=4.5.1\r\n\r\n---\r\n### Installation\r\n\r\n```\r\n$ pip install ycnbc --upgrade --no-cache-dir\r\n```\r\n\r\n---\r\n\r\n### Usage for Markets\r\n```python\r\nimport ycnbc\r\n\r\nmarkets = ycnbc.Markets()\r\n\r\nquote_summary = markets.quote_summary('AAPL')\r\npre_markets = markets.pre_markets()\r\nus_markets = markets.us_markets()\r\neurope_markets = markets.europe_markets()\r\nasia_markets = markets.asia_markets()\r\ncurrencies = markets.currencies()\r\ncryptocurrencies = markets.cryptocurrencies()\r\nfutures_and_commodities = markets.futures_and_commodities()\r\nbonds = markets.bonds()\r\nfunds_and_etfs = markets.funds_and_etfs()\r\n```\r\n\r\n### Usage for news\r\n\r\n```python\r\nimport ycnbc\r\n\r\nnews = ycnbc.News()\r\n\r\n# Get trending news\r\ntrending_ = news.trending()\r\n\r\n# Get latest news\r\nlatest_ = news.latest()\r\n\r\n# Get news by category\r\neconomy_ = news.economy()\r\njobs_ = news.jobs()\r\nwhite_house_ = news.white_house()\r\nhospitals_ = news.hospitals()\r\ntransportation_ = news.transportation()\r\nmedia_ = news.media()\r\ninternet_ = news.internet()\r\ncongress_ = news.congress()\r\npolicy_ = news.policy()\r\nfinance_ = news.finance()\r\nlife_ = news.life()\r\ndefense_ = news.defense()\r\neurope_politics_ = news.europe_politics()\r\nchina_politics_ = news.china_politics()\r\nasia_politics_ = news.asia_politics()\r\nworld_politics_ = news.world_politics()\r\nequity_opportunity_ = news.equity_opportunity()\r\npolitics_ = news.politics()\r\nwealth_ = news.wealth()\r\nworld_economy_ = news.world_economy()\r\ncentral_banks_ = news.central_banks()\r\nreal_estate_ = news.real_estate()\r\nhealth_science_ = news.health_science()\r\nsmall_business_ = news.small_business()\r\nlifehealth_insurance_ = news.lifehealth_insurance()\r\nbusiness_ = news.business()\r\nenergy_ = news.energy()\r\nindustrials_ = news.industrials()\r\nretail_ = news.retail()\r\ncybersecurity_ = news.cybersecurity()\r\nmobile_ = news.mobile()\r\ntechnology_ = news.technology()\r\ncnbc_disruptors_ = news.cnbc_disruptors()\r\ntech_guide_ = news.tech_guide()\r\nsocial_media_ = news.social_media()\r\nclimate_ = news.climate()\r\n```\r\n\r\nNote:\r\n\r\n- URL pages containing news content that have the `PRO` tag still cannot be retrieved using this library.\r\n\r\n---\r\n\r\n### Legal Stuff\r\n\r\n**ycnbc** is distributed under the **Apache Software License**. See\r\nthe [LICENSE.txt](./LICENSE.txt) file in the release for details.\r\n\r\n---\r\n\r\n### P.S.\r\n\r\nPlease drop me a note with any feedback you have.\r\n\r\n**Asep Saputra**\r\n",
"bugtrack_url": null,
"license": "Apache",
"summary": "Download data from CNBC!",
"version": "1.0.8",
"project_urls": {
"Homepage": "https://github.com/asepscareer/ycnbc"
},
"split_keywords": [
"scrape news",
" cnbc library",
" cnbc python",
" cnbc api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0cc8feb51b7445de30dff434f84d078a4d9e2c31da73119acdca1202320dd20a",
"md5": "66acf86c1afd5844528e4b3e1a63d6a8",
"sha256": "b349fb5b0db8ed63ed24daf5c6c925a1a32833f08001cf3ab417039954153008"
},
"downloads": -1,
"filename": "ycnbc-1.0.8-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "66acf86c1afd5844528e4b3e1a63d6a8",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 12459,
"upload_time": "2024-07-26T10:06:41",
"upload_time_iso_8601": "2024-07-26T10:06:41.982476Z",
"url": "https://files.pythonhosted.org/packages/0c/c8/feb51b7445de30dff434f84d078a4d9e2c31da73119acdca1202320dd20a/ycnbc-1.0.8-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3471e0c7bafc0b4b71fd2545501c937e55f27de7675a0d57b8d83e7fa491d41f",
"md5": "d97f25fcf40968e614c894b7463040ca",
"sha256": "b66fd76cb7706458976358192faeda527ceea264e81cf6ee648c8328b056b165"
},
"downloads": -1,
"filename": "ycnbc-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "d97f25fcf40968e614c894b7463040ca",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12926,
"upload_time": "2024-07-26T10:06:43",
"upload_time_iso_8601": "2024-07-26T10:06:43.555459Z",
"url": "https://files.pythonhosted.org/packages/34/71/e0c7bafc0b4b71fd2545501c937e55f27de7675a0d57b8d83e7fa491d41f/ycnbc-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 10:06:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "asepscareer",
"github_project": "ycnbc",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ycnbc"
}