Providing a CLI to search BBC News by category and retrieving their article contents.
Project description
BBC News CLI
A command-line tool for fetching and reading BBC news articles directly from your terminal.
Features
- ๐ฐ Browse headlines from 12 BBC news categories
- ๐ Read full article content with clean, wrapped text formatting
- ๐ Extract article IDs from RSS feeds for quick access
Installation
pip install -e .
Usage
View Category Headlines
Fetch the latest headlines from a specific BBC category:
bbc news category [CATEGORY] [--limit N]
Available categories:
frontpage(default)business,entertainment,health,educationpolitics,technology,worldengland,scotland,wales,in-depth
Examples:
# Get top 10 frontpage headlines
bbc news category frontpage
# Get top 5 business headlines
bbc news category business --limit 5
Output shows article IDs you can use to read full content:
# ID TITLE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 cgk0j71g417o UK forecast to see biggest hit to growth...
2 c5y8d721q18o Rocket stocks soar on report Musk's SpaceX...
Read Full Article
Retrieve and display the full content of a BBC article:
bbc news article <ARTICLE-ID>
Example:
bbc news article c5y8d721q18o
Options
-v, --verboseโ Enable verbose logging for debugging
Dependencies
- Python โฅ 3.10
- click
- feedparser
- beautifulsoup4
- requests
Development
The CLI uses a plugin-based command system. Add new commands by creating cmd_*.py files in src/core_cli/commands/.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bbc_news_cli-1.0.0.tar.gz.
File metadata
- Download URL: bbc_news_cli-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02545d4f9b83e8ee58a688410e88f174178d9f43c2d2a9e9725d75ce91b59aef
|
|
| MD5 |
aa937e15e9e3af9cb4441e12b1b2fbf3
|
|
| BLAKE2b-256 |
580204403025980ae37008b52bb4b18ecefe4d15a5d5c7d47a1b241e29d7d3ae
|
File details
Details for the file bbc_news_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bbc_news_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2807aceea1ae2fc042bcbccaa4fc7aea9495df30c7d28ecbc990381f6304d6fb
|
|
| MD5 |
79900720968ff7b0849e8c5d3ac54492
|
|
| BLAKE2b-256 |
27ad0dc8026b78867ba99b22b2e58aed991bc274357cb846fa1ecb2d778ffdb4
|