Skip to main content

Python scrabing news from any news website

Project description

SimplyNews design to give best article details with Newspaper3k repo

Install

Install into your Python path using pip or easy_install:

$ pip install SimplyNews
$ easy_install SimplyNews

Usage

After installing it, this is how you use it:

Initialize SimplyNews.
>>> url = "https://www.bbc.co.uk/news/uk-scotland-54379026"
>>> from SimplyNews import SimplyNews
>>> simplynews = SimplyNews(url, 'en')

Request processed raw_news
>>> simplynews.raw_news()
text = simplynews.text

Request processed cleaned_news
>>> simplynews.cleaned_news()
text = simplynews.text
# removed all images, links, emails from text
# also replaced all h2, h3, h4 tags with [h2], [h3], [h4]

Request processed prettier_news
>>> simplynews.prettier_news()
text = simplynews.text
# removed all images, links, emails from text
# also aded all h2, h3, h4 tags to text

Accessible parameters

text original_text original_html keywords desc title top_image_url images published_date = None authors

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SimplyNews-1.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

SimplyNews-1.0-py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page