Giter VIP home page Giter VIP logo

pint-assg's Introduction

Pint AI - Google RSS Scraper & API

Built using Python - Flask & Newspaper & SQLite

Create a virtual environment

python -m venv ENV

For Windows: ENV/Scripts/activate

For Unix or Linux: ENV/bin/activate

Install required packages pip install -r requirement.txt

API will run on localhost:5000

Retrieve articles from the SQLite database based on specified filters.

Returns: A JSON response containing a list of articles matching the filters.

Query Parameters:

  • title (str): Filter articles by title (optional).
  • url (str): Filter articles by URL (optional).
  • limit (int): Limit the number of articles returned (default: 10).
  • publish_date (str): Filter articles by publish date (optional).
  • publisher (str): Filter articles by publisher (optional).

Example Usage

To retrieve articles with any parameters

curl "localhost:5000/articles?title=example_title&publish_date=yyyy-mm-dd&limit=10&publisher=example_publisher&url=example_url"

To retrieve articles with simple parameters

curl "localhost:5000/articles?limit=100"

Retrieves summary articles from the SQLite database based on the provided filters.

To use this API, make a GET request to the /summary endpoint with the following query parameters:

  • hour: (Optional) A string representing the hour to filter articles by yyyy-mm-dd HH:00:00.
  • publisher: (Optional) A string representing the publisher to filter articles by.
  • limit: (Optional) An integer representing the maximum number of articles to retrieve. The default is 10.

Example

curl "localhost:5000/summary?hour=yyyy-mm-dd HH:00:00&publisher=nytimes&limit=5"

pint-assg's People

Contributors

highoncarbs avatar

Watchers

 avatar  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.