Giter VIP home page Giter VIP logo

flasknewsapplication's Introduction

FlaskNewsApplication

Project Description

About

Creating a website using Google News API to display news from various sources and allow users to search for news based on parameters such as:

  • Keywords
  • Publish Date Range
  • Genre
  • Source

External libraries and APIs

  • Google News API
  • d-3 cloud library

Front-end Technologies

  • HTML
  • CSS
  • Javascript
  • AJAX

Back-end Technologies

  • Flask (Python)

Home Page

The home page has a carousel that shows the latest news from all sources. This news is fetched from the Google News API. The home page also features a word cloud of top 30 most frequently appearing words in news titles. The home page also displays the top 5 news articles from Fox News and CNN which are fetched using Google News API. The button on the left is used to toggle between the home page and the search page.

Home Page

Search Page

The search page has a form which lets users search for articles based on various parameters. Search results are displayed as cards. User can use the "Show More" and "Show Less" button to display more or less search results. On clicking each card, it expands showing additional details about a particular news articles. It also has a link which takes the user to the news website having that article.

Search Page

Project Flow

Fetching Data

  • Flask makes calls to the Google News API endpoint to fetch and process data.
  • AJAX is used to make asynchronous calls to Flask backend to fetch the processed data.
  • The JSON response obtained via AJAX is processed and displayed.

Run code

  • Clone this github repository
  • Create your own Google News API-KEY and replace it with the "YOUR-API-KEY" in application.py
  • Start the virtual environment
  • Run pip install -r requirements.txt or pip3 install -r requirements.txt.
  • Run python application.py to start the server

Here is a link to a video showing the complete functioning: https://www.youtube.com/watch?v=AX00rwq-qQc&feature=youtu.be

flasknewsapplication's People

Contributors

ayushbha avatar

Watchers

 avatar

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.