A python package to get news from BBC.
Project description
BBCNews
A python package to get news from BBC.
Installation
pip3 install BBCHeadlines
Usage
Get all top articles of right now:
from BBCHeadlines import news
print(news())
Get the top article:
print(news(limit=1))
Sample response:
[
{
"title":"US election: Trump campaign seeks partial recount in Wisconsin",
"title_detail":{
"type":"text/plain",
"language":"None",
"base":"http://feeds.bbci.co.uk/news/world/rss.xml",
"value":"US election: Trump campaign seeks partial recount in Wisconsin"
},
"summary":"Two counties will be asked to recount votes as Donald Trump continues to contest the election result.",
"summary_detail":{
"type":"text/html",
"language":"None",
"base":"http://feeds.bbci.co.uk/news/world/rss.xml",
"value":"Two counties will be asked to recount votes as Donald Trump continues to contest the election result."
},
"links":[
{
"rel":"alternate",
"type":"text/html",
"href":"https://www.bbc.co.uk/news/world-us-canada-54994212"
}
],
"link":"https://www.bbc.co.uk/news/world-us-canada-54994212",
"id":"https://www.bbc.co.uk/news/world-us-canada-54994212",
"guidislink":False,
"published":"Wed, 18 Nov 2020 18:40:53 GMT",
"published_parsed":time.struct_time(tm_year=2020,
tm_mon=11,
tm_mday=18,
tm_hour=18,
tm_min=40,
tm_sec=53,
tm_wday=2,
tm_yday=323,
tm_isdst=0)
}
]
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-4.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for BBCHeadlines-4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed59026ca03af07cc2a6eb5a3d17cc756775818a8c238e0502581b86abcf1c6 |
|
MD5 | d4b287b773c8877bd9e3916319db1e2b |
|
BLAKE2b-256 | a6bf89556f23ce8fdcd2f6d446b7278789527d307b9cbd077740498b3c1c1bcc |