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
pynews-google-0.1.2.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file pynews-google-0.1.2.tar.gz
.
File metadata
- Download URL: pynews-google-0.1.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15676a9fcab28684179a3ee5b1019e5d48e98a3c394e4478604bb9a84b8052b3 |
|
MD5 | 5839573e1c9391c08d0f49184f67bc4e |
|
BLAKE2b-256 | 30783c0be50e2ebc4257b1f3393086196f85c086b47bb4320c0af16960e55326 |
File details
Details for the file pynews_google-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pynews_google-0.1.2-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 | b1e322eeb78af518c24f3ce3a747d42da4d286a3034b11c318350cfbd25b8676 |
|
MD5 | 6b9e84e8a153a39f3ab5ad22d4033709 |
|
BLAKE2b-256 | e2ac2044804ce6d227395dba4a772bc2406efbf57ecd252c4edde4c2fe965d42 |