yahoo-finance-scraper

Scraper Library for Yahoo Finance Stock Data.

Лицензия

Лицензия

Группа

Группа

io.github.mainstringargs
Идентификатор

Идентификатор

yahoo-finance-scraper
Последняя версия

Последняя версия

1.1
Дата

Дата

Тип

Тип

zip
Описание

Описание

yahoo-finance-scraper
Scraper Library for Yahoo Finance Stock Data.
Ссылка на сайт

Ссылка на сайт

https://github.com/mainstringargs/yahoo-finance-scraper
Система контроля версий

Система контроля версий

https://github.com/mainstringargs/yahoo-finance-scraper

Скачать yahoo-finance-scraper

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 20.0
com.mashape.unirest : unirest-java jar 1.4.9
com.google.code.gson : gson jar 2.8.5
commons-lang : commons-lang jar 2.6
io.github.mainstringargs : stock-data-spi jar 1.1

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Yahoo Finance Scraper

Yahoo Finance discontinued their official API, but data can still be accessed. This project exposes that data as a Java project. There is an Example included which is intended to show how to access data relevant to a specific company.

To get started, clone the project and run:

./gradlew build

To try it out, run this command

./gradlew run

It will output Yahoo's recommendation mean for a couple of stocks.

The Example for code looks like this:

    for (String symbol : args) {

      YahooFinanceUrlBuilder builder =
          new YahooFinanceUrlBuilder().modules(YahooFinanceModules.values()).symbol(symbol);

      YahooFinanceRequest request = new YahooFinanceRequest();

      YahooFinanceData financeData = request.getFinanceData(request.invoke(builder));


      if (financeData.getFinancialData() != null) {
        FinancialData financials = financeData.getFinancialData();

        System.out.println(symbol + ": currentPrice: $" + financials.getCurrentPrice().getRaw()
            + "; recommendationMean " + financials.getRecommendationMean().getRaw());
      }
    }

Which will output something like this:

fb: currentPrice: $198.2235; recommendationMean 1.8
amzn: currentPrice: $1723.34; recommendationMean 1.7
baba: currentPrice: $208.42; recommendationMean 1.7

Версии библиотеки

Версия
1.1
1.0