arbuzovv / rusquant

Official version of rusquant package for R
http://rusquant.ru
GNU General Public License v3.0
45 stars 20 forks source link

Finam moved to https from http #3

Closed gBopHuk closed 7 years ago

gBopHuk commented 7 years ago
getSymbols("SPFB.BR",src="Finam",from=Sys.Date()-7,to=Sys.Date(),period="day")
    As of 0.4-0, ‘getSymbols’ uses env=parent.frame() and
 auto.assign=TRUE by default.

 This  behavior  will be  phased out in 0.5-0  when the call  will
 default to use auto.assign=FALSE. getOption("getSymbols.env") and 
 getOptions("getSymbols.auto.assign") are now checked for alternate defaults

 This message is shown once per session and may be disabled by setting 
 options("getSymbols.warning4.0"=FALSE). See ?getSymbols for more details.
Error in download.file(stocklist.URL, destfile = tmp, quiet = !verbose) : 
  cannot open URL 'http://www.finam.ru/cache/icharts/icharts.js'

URL 'http://www.finam.ru/cache/icharts/icharts.js' redirects to the 'httpS://www.finam.ru/cache/icharts/icharts.js' in the browsers

gBopHuk commented 7 years ago

Commit 83dc7b9127698d642057e65279cb5b3c012605a5 fix this problem. Thanks!

gBopHuk commented 7 years ago

83dc7b9 doesn't works in windows but works in linux

 > getSymbols("SPFB.BR",src="Finam",from=Sys.Date()-7,to=Sys.Date())
Ошибка в download.file(stocklist.URL, destfile = tmp, quiet = !verbose) :
  не могу открыть URL 'https://www.finam.ru/cache/icharts/icharts.js'
Вдобавок: Предупреждение:
В download.file(stocklist.URL, destfile = tmp, quiet = !verbose) :
  'InternetOpenUrl' не удалось: 'Сброшено подключение к этому серверу.'
arbuzovv commented 7 years ago

Change method to curl_download