Giter VIP home page Giter VIP logo

cnn-fear-and-greed-parse's Introduction

cnn-fear-and-greed-parse Go Reference example workflow

Golang package to fetch and parse data from https://money.cnn.com/data/fear-and-greed/

Usage example:

package main

import (
	"encoding/json"
	"fmt"
	CNNParse "github.com/wildsurfer/cnn-fear-and-greed-parse"
)

func main() {
	result, err := CNNParse.Parse()
	if err != nil {
		panic(err)
	}

	b, _ := json.Marshal(result)
	fmt.Println(string(b))
}

Output

{
  "imageUrl":"http://markets.money.cnn.com/Marketsdata/uploadhandler/z748f7c0aza9d607b00bf84c6a8b0283e2745ded10.png",
  "now":{
    "value":44,
    "text":"Fear"
  },
  "previousClose":{
    "value":44,
    "text":"Fear"
  },
  "oneWeekAgo":{
    "value":49,
    "text":"Neutral"
  },
  "oneMonthAgo":{
    "value":48,
    "text":"Neutral"
  },
  "oneYearAgo":{
    "value":25,
    "text":"Extreme Fear"
  },
  "lastUpdateDate":"2020-03-30T15:50:00-05:00"
}

cnn-fear-and-greed-parse's People

Contributors

wildsurfer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cnn-fear-and-greed-parse's Issues

Does not work

It returns zeros:

{}{
"imageUrl": "",
"now": {
"value": 0,
"text": ""
},
"previousClose": {
"value": 0,
"text": ""
},
"oneWeekAgo": {
"value": 0,
"text": ""
},
"oneMonthAgo": {
"value": 0,
"text": ""
},
"oneYearAgo": {
"value": 0,
"text": ""
},
"lastUpdateDate": "0001-01-01T00:00:00Z"
}

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.