Google News search for Python
Project description
GoogleNews
Install
pip install GoogleNews
or
pip install --upgrade GoogleNews
Usage
- Initializing
from GoogleNews import GoogleNews
googlenews = GoogleNews()
- Optional choose language
googlenews = GoogleNews('en')
or
googlenews.setlang('en')
- Search keyword Default return first page result
googlenews.search('APPL')
- Get other page of search results
googlenews.getpage(2)
- Get result
It will return a list,
[{'title': '...', 'media': '...', 'date': '...', 'desc': "...", 'link': '...', 'img': '...'}]
googlenews.result()
or just get a list of news titles
googlenews.gettext()
or just get a list of news links
googlenews.getlinks()
- Clear result list Clear result list before you get another search or page
googlenews.clear()
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
GoogleNews-1.3.4.tar.gz
(4.3 kB
view details)
File details
Details for the file GoogleNews-1.3.4.tar.gz.
File metadata
- Download URL: GoogleNews-1.3.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152e8df1e6e89808b4b6ad5376b4fa98559183bedff543b32ee5906c92a0e0dc
|
|
| MD5 |
1e0835c5371bb296af906a7795b0f90b
|
|
| BLAKE2b-256 |
e4dbd4f511f0e610f58b6d15d6758daab4ec5c9a3e07ea92962bb395937225f7
|