Skip to main content

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 details)

Uploaded Source

Built Distribution

BBCHeadlines-4.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file BBCHeadlines-4.1.tar.gz.

File metadata

  • Download URL: BBCHeadlines-4.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4

File hashes

Hashes for BBCHeadlines-4.1.tar.gz
Algorithm Hash digest
SHA256 4fdc2078d2cf60a7ef71ae3909e41b1cb10f3889112ffdddec1ddf3931b208f5
MD5 c41e483f8d61832276796f55765b9800
BLAKE2b-256 e0769197935bcacbd7d739fa003fa10aec510dea4743a344d9c27f4136e80b60

See more details on using hashes here.

File details

Details for the file BBCHeadlines-4.1-py3-none-any.whl.

File metadata

  • Download URL: BBCHeadlines-4.1-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.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.4

File hashes

Hashes for BBCHeadlines-4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed59026ca03af07cc2a6eb5a3d17cc756775818a8c238e0502581b86abcf1c6
MD5 d4b287b773c8877bd9e3916319db1e2b
BLAKE2b-256 a6bf89556f23ce8fdcd2f6d446b7278789527d307b9cbd077740498b3c1c1bcc

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