An open API service indexing awesome lists of open source software.

https://github.com/tachodril/easy_horo


https://github.com/tachodril/easy_horo

beautifulsoup4 flask

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# Easy_horo

Horoscope API and application

An API to extract horoscope using web scraping.

Features :

  • Today's horoscope

  • Jsonified into date, horoscope and sunsign.
  • Weekly horoscope

  • Jsonified into week, horoscope and sunsign.
  • Monthly horoscope

  • Jsonified into month, horoscope and sunsign.

    API Usage :

    Usage 1.

    Web Page Link that uses the API : https://easyhoro.herokuapp.com/

    Steps included:

    1. Open the above link in your browser.
    2. Now, select your sunsign and time for which you want to know your horoscope.
    3. Click on ‘submit’ button.
    4. There you go. (To get another horoscope, follow steps 2 & 3 again.)

    Usage 2.

    You can directly open the api server and use json data in your app.

    API Base URL : https://easy-horo.herokuapp.com/

    GET : /today/sunsign

    GET : /weekly/sunsign

    GET : /monthly/sunsign

    Example Usage 2: GET https://easy-horo.herokuapp.com/today/aquarius

    Example Result:

    {
    "date":"27-09-2019",
    "result":"You will seek spirituality as you feel thoroughly dejected by your present situation.
    Ritik says that even struggling courageously with circumstances requires a spiritual endeavour.
    These trying times give you the patience to deal intelligently with challenges and setbacks.",
    "sunsign":"aquarius"
    }

    Development:

  • Web Scraping from a horoscope website (ganeshaspeaks) using Python and Beautiful Soup.

  • Using Flask, created server and RESTful API to return requested JSON data.

  • Created a web page to show example of using the above created API and used javascript to fetch API and parse JSON data.

  • Used Heroku cloud platform to host the API server as well as web page.
  • Tools Used :

  • Beautiful Soup

  • Flask

  • Requests (Pyhton Module)

  • Heroku (cloud platform)