Skip to main content

GoogleNews

Build Status Coverage Status PyPI PyPI - Downloads PyPI - Python Version PyPI - Wheel GitHub contributors GitHub issues GitHub Action GitHub

Install

pip install GoogleNews

or

pip install --upgrade GoogleNews

Usage

  • Initializing
from GoogleNews import GoogleNews
googlenews = GoogleNews()
  • Optional choose language
googlenews = GoogleNews(lang='en')
  • Optional choose period (period and custom day range should not set together)
googlenews = GoogleNews(period='d')
  • Optional choose custom day range (mm/dd/yyyy)
googlenews = GoogleNews(start='02/01/2020',end='02/28/2020')
  • Optional set encode
googlenews = GoogleNews(encode='utf-8')

or

googlenews.setlang('en')
googlenews.setperiod('d')
googlenews.setTimeRange('02/01/2020','02/28/2020')
googlenews.setencode('utf-8')
  • 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()

Issue

  • Image is not working in the latest version, it can only return default google loading gif

Metadata

Release files for GoogleNews 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GoogleNews 1.4.1
File Size Uploaded Provenance Actions
GoogleNews-1.4.1.tar.gz 4.4 kB Without provenance Details for GoogleNews-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GoogleNews 1.4.1
File Interpreter ABI Platform Actions
GoogleNews-1.4.1-py3-none-any.whl Python 3 none any Details for GoogleNews-1.4.1-py3-none-any.whl

Total release size: 9.8 kB

Release files / GoogleNews-1.4.1.tar.gz

Download URL GoogleNews-1.4.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
83db68f16314312982cec049971fb014896428b1722e86ce8de167e299d106f7
BLAKE2b-256 checksum
How to use checksums
ce65a6c91b593538bbea54ee67c7a84c555af3b48a95ab177cc43d916dfdc88f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / GoogleNews-1.4.1-py3-none-any.whl

Download URL GoogleNews-1.4.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87a16634e7347d3ef5e25c1251e589ced4209f07f365ce8e872b962dbbe2af1f
BLAKE2b-256 checksum
How to use checksums
65434d5008157ca602aa87ebba28b1c0ac8451b0b3f77f5467de7cec8c88e5f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Security for GoogleNews 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page