diff --git a/README.md b/README.md index 1705cfa..d2d2213 100644 --- a/README.md +++ b/README.md @@ -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' diff --git a/pygooglenewsscraper/__init__.py b/pygooglenewsscraper/__init__.py index e69de29..89b62c9 100644 --- a/pygooglenewsscraper/__init__.py +++ b/pygooglenewsscraper/__init__.py @@ -0,0 +1 @@ +from googlenewsscraper import Request, GoogleNews, NewsArticle \ No newline at end of file diff --git a/pygooglenewsscraper/example.py b/pygooglenewsscraper/example.py index 0bf4556..854b48a 100644 --- a/pygooglenewsscraper/example.py +++ b/pygooglenewsscraper/example.py @@ -1,6 +1,4 @@ -from googlenewsscraper import GoogleNews -from googlenewsscraper import NewsArticle - +from pygooglenewsscraper import GoogleNews, NewsArticle # define keyword keyword = 'artificial intelligence' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..293a7d8 --- /dev/null +++ b/setup.py @@ -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', + ], +) \ No newline at end of file