Skip to main content

Retrieve RNZ news.

Project description

rnz-news

Retrieve RNZ news.

Install.

pip install rnz-news

Usage.

1. Retrieve all categories.

rnz_news = RnzNews()

for category in rnz_news.categories():

    print(category.path)
    print(category.address)
    print(category.description)

2. Get access to a category with a given path.

sport_category = RnzNews()['news/sport']

3. Retrive articles through a category.

sport_category = RnzNews()['news/sport']

for articles, page in sport_category:

    print('page: {}'.format(page))

    for article in articles:

        print(article.category)
        print(article.path)
        print(article.address)
        print(article.title)
        print(article.summary)
        print(article.time)
        print(article.content)
        print(article.html)

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

rnz_news-1.0.1.tar.gz (3.0 kB view hashes)

Uploaded source

Built Distribution

rnz_news-1.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page