A python package to get news from BBC.
Project description
BBCNews
A python package to get news from BBC.
Installation
pip3 install BBCHeadlines
Usage
Print headlines:
# Import BBCHeadlines
from BBCHeadlines import articles
# Print the title of article #article_num five times. article_num increases by one every time the loop is increased, starting at zero.
for article_num in range (5):
print(articles.title()[article_num])
Print info on first article:
# Import library
from BBCHeadlines import articles
# We'll get info on the first article
article_num = 0
# Print article title
print('Title: ' + articles.title()[article_num])
# Print article description
print('Description: ' + articles.description()[article_num])
# Print article link
print('Link: ' + articles.link()[article_num])
We can put this into a loop to get headlines with info on the articles:
# Import library
from BBCHeadlines import articles
# Print info on article #article_num five times. article_num increases by one every time the loop is increased, starting at zero.
for article_num in range (5):
# Print article title
print('Title: ' + articles.title()[article_num])
# Print article description
print('Description: ' + articles.description()[article_num])
# Print article link
print('Link: ' + articles.link()[article_num])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
BBCHeadlines-3.tar.gz
(1.7 kB
view details)
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 BBCHeadlines-3.tar.gz.
File metadata
- Download URL: BBCHeadlines-3.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70d4a08c7139660b9c8fa223c9b1ef110c33393768872c1f38efa3fa9ba3cbfa
|
|
| MD5 |
c06e5e4ce36523a03a7cd61b9d946523
|
|
| BLAKE2b-256 |
5367d46d3b7268dd6115628653e5bff450e67c4600a3d8f2f24a7317491c6fd2
|
File details
Details for the file BBCHeadlines-3-py3-none-any.whl.
File metadata
- Download URL: BBCHeadlines-3-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2460e10ad273b8e445183fa2e82c6427dc34cccd03317f230ad3d8feb1c5ac
|
|
| MD5 |
8f85b6c39e93918ef15884b575842074
|
|
| BLAKE2b-256 |
a2614909c19f811a06459aa016fd8132d077039c0a13ac2d7165046945133ea6
|