A Python library to fetch and parse Google News feeds
Project description
PyNews-Google
A Python library to fetch and parse Google News feeds.
Installation
pip install pynews-google
Usage
As a library
from pynews_google import GoogleNews
news = GoogleNews()
# Get top news
top_news = news.top_news()
# Get topic headlines
tech_news = news.topic_headlines('TECHNOLOGY')
# Search news
search_results = news.search('Python programming')
# Print results
for entry in top_news['entries']:
print(f"Title: {entry['title']}")
print(f"Link: {entry['link']}")
print(f"Published: {entry['published']}")
print("---")
As a CLI
pynews-google top
pynews-google topic --topic TECHNOLOGY
pynews-google search --query "Python programming"
Features
- Fetch top news from Google News
- Get headlines for specific topics
- Search for news articles
- Command-line interface for quick access to news
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Amos Maru
Acknowledgments
- Google News for providing the RSS feeds
- All contributors who help improve this library
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
news-google-api-0.1.3.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file news-google-api-0.1.3.tar.gz
.
File metadata
- Download URL: news-google-api-0.1.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c42b2c77d813d08e8afd3a4cfe7e74bd03b5349e2b97fe8b3a18b45fd025b8 |
|
MD5 | 0b23f6002f2ab8089cd87d5417b6118a |
|
BLAKE2b-256 | d62078da0a0c25d97980f0944caf72713c4af5acadd88773029bdddeb77adf86 |
File details
Details for the file news_google_api-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: news_google_api-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a603b310e3fe7430d6b203e5044acab529d746748c5d70ab7ab27f9863ec7964 |
|
MD5 | 63cd17e1861fc623820676836e04d6b3 |
|
BLAKE2b-256 | dfcf8a3293a38b283e3f8b780f627ce268b32fd8830c8b88d5ac081ab06b83b4 |