Git Product home page Git Product logo

newsx's Introduction

NewsX

NewsX is build on top of the newsapi. It uses newsapi to fetch top-headlines of different news sites. You can search topnews by keyword. You can also get the country-wise top-headlines.

Image of Yaktocat

Installation:

From GitHub:

  • Clone this repo.

Create new django project (https://www.djangoproject.com/start/):

pip install django

django-admin startproject 'project_name'

move to project directory and run:

python manage.py migrate

python manage.py runserver

python manage.py startapp 'app_name'

Installation:

Also available on PyPI site. github link - (https://github.com/mattlisiv/newsapi-python):

pip install newsapi-python (with developer account, you can only do 500 request in 24 hours and 250 request in 12 hours)

How to use:

Initialising the instance/api: (https://newsapi.org/)

from newsapi import NewsApiClient

 Init
newsapi = NewsApiClient(api_key='your_newsapi_key') 

 /v2/top-headlines
top_headlines = newsapi.get_top_headlines(q='bitcoin',
                                          sources='bbc-news,the-verge',
                                          category='business',
                                          language='en',
                                          country='us')

 /v2/everything
all_articles = newsapi.get_everything(q='bitcoin',
                                      sources='bbc-news,the-verge',
                                      domains='bbc.co.uk,techcrunch.com',
                                      from_param='2017-12-01',
                                      to='2017-12-12',
                                      language='en',
                                      sort_by='relevancy',
                                      page=2)

 /v2/sources
sources = newsapi.get_sources()

newsx's People

Contributors

imomkar avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nitaiz123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.