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.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: BBCHeadlines-4.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.tar.gz
Algorithm Hash digest
SHA256 e0435499354f4aae3459d3e206c201ce37173ebab4c5f010bdf04ae72d280f36
MD5 798f27507171ce928cd041010afab7a0
BLAKE2b-256 2be2e1f4ecbb31254601806018498d03cfbe15fc0be2d0f1bb297b0a0320c874

See more details on using hashes here.

File details

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

File metadata

  • Download URL: BBCHeadlines-4-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-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd523b986a7450993f169ee2d79676853c52ef8e915d6e400b35e94d5ef83e1
MD5 77dfc8f0e8f05e963375bc8c5a06ad49
BLAKE2b-256 347b198b26645052feff4a23859ad2a471dee48dae844d972cc399940f0ef04f

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