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)