Skip to content

Commit

Permalink
update readme with pip installing of package
Browse files Browse the repository at this point in the history
  • Loading branch information
shaheen-syed committed Aug 23, 2021
1 parent f6a308c commit 55dd990
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ Scrape the news content from the Google news website (https://news.google.com).

It uses a keyword to retrieve the news title, URL, publisher, and date. The complete news content can then be retrieved from the URL.

## Installation

```bash
pip3 install pygooglenewsscraper
```


## Examples

Retrieve Google News items through a search keyword

```python
from pygooglenewsscraper import GoogleNews, NewsArticle

# define keyword
keyword = 'artificial intelligence'
Expand Down
1 change: 1 addition & 0 deletions pygooglenewsscraper/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from googlenewsscraper import Request, GoogleNews, NewsArticle
4 changes: 1 addition & 3 deletions pygooglenewsscraper/example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from googlenewsscraper import GoogleNews
from googlenewsscraper import NewsArticle

from pygooglenewsscraper import GoogleNews, NewsArticle

# define keyword
keyword = 'artificial intelligence'
Expand Down
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from distutils.core import setup

setup(
name = 'pygooglenewsscraper',
packages = ['pygooglenewsscraper'],
version = '0.1',
license = 'MIT',
description = 'Scrape news content from the Google News website',
author = 'Shaheen Syed',
author_email = 'shaheensyed15@gmail.com',
url = 'https://github.com/shaheen-syed',
download_url = 'https://github.com/shaheen-syed/pygooglenewsscraper/archive/refs/tags/v_0.1.tar.gz',
keywords = ['web scraper', 'google news', 'parser', 'python', 'crawler'],
install_requires=[
'requests',
'trafilatura',
'beautifulsoup4',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)

0 comments on commit 55dd990

Please sign in to comment.