-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


[ ]

, 09 2017 . 16:36 +
, , . , , ?

. , ?

, . , .

, . , , . . , . , , , . . . 20-60 : ?! ?! ?! ! ! . . . . . . . , , .


, . , , , .

. ? . . ? ? , ̻ - finam.ru! ̻ , ():



, . ? ? ! ! . ? : .

(), , . () ̻ :



, , -, ̻; -, -, ().

:

www.finam.ru/profile/moex-akcii/polymetal-international-plc/export
www.finam.ru/profile/moex-akcii/pllc-yandex-n-v/export
www.finam.ru/profile/moex-akcii/alrosa-ao/export

. . . ? . . 6131 ().

̻? ? , . Polymetal, GET :
__http://export.finam.ru/POLY_170620_170623.txt?market=1&em=175924&code=POLY&apply=0&df=20&mf=5&yf=2017&from=20.06.2017&dt=23&
mt=5&yt=2017&to=23.06.2017&p=8&f=POLY_170620_170623&e=.txt&cn=POLY&dtf=1&tmf=1&
MSOR=1&mstime=on&mstimever=1&sep=1&sep2=1&datf=1&at=1

em, market, code. em , (). , () em . market , () ? : ***, ***, ***, .. code .

, : em market code. (). ? : . , , :

www.finam.ru/profile/moex-akcii/polymetal-international-plc/export

, javascript , ():

Finam.IssuerProfile.Main.issue = {"quote": {"id": 175924, "code": "POLY", "fullUrl": "moex-akcii/polymetal-international-plc", "title": "Polymetal", "decp": 1, "testDriveEnabled": false, "market": {"id": 1, "title": " ", "volumeEnabled": true},"info": {"decp": 1, "last": 680, "pchange": 1.87266, "change": 12.50001, "bid": null, "ask": null, "open": 668, "high": 686, "low": 666, "close": 667.5, "volume": 53037, "date": "05.07.2017 18:47:18", "weekMin": 653.5, "weekMax": 688, "monthMin": 653.5, "monthMax": 753, "yearMin": 572, "yearMax": 1009.5,"currency": ".","volumeCode": "."},"
/*    ,      */
 175924, "url": "/profile/moex-akcii/polymetal-international-plc/secondary/", }, "corporativeEvents": {"quote": 175924, "url": "/profile/moex-akcii/polymetal-international-plc/corporate/", }, "blogsAndGraphs": {"quote": 175924, "url": "__http://whotrades.com/markets/instrument/polymetal-international-plc", "count": "1", "pageSize": 1, "pageNumber": 1, "pagesCount": 1}}};

, id em; code, id . (). , , :

www.finam.ru/profile/moex-akcii/pllc-yandex-n-v/export
www.finam.ru/profile/moex-akcii/alrosa-ao/export

. , , : , (). javascript, em, market code . , ̻ . .

? , Java. ȅ , . Jsoup. htmlunit.



. (1) , ̻ () (2). , . , 6131 (). , . .

function_parameters.csv. ̻ . function_parameters.csv .

̻ ( Python), GET :
__http://export.finam.ru/POLY_170620_170623.txt?market=1&em=175924&code=POLY&apply=0&df=20&mf=5&yf=2017&from=20.06.2017&dt=23&
mt=5&yt=2017&to=23.06.2017&p=8&f=POLY_170620_170623&e=.txt&cn=POLY&dtf=1&tmf=1&
MSOR=1&mstime=on&mstimever=1&sep=1&sep2=1&datf=1&at=1

POLY_170620_170623 , code, .

.txt ; e; .

www.finam.ru/profile/moex-akcii/gazprom/export form ( name=exportdata). .

market, em, code , , .
df, mf, yf, from, dt, mt, yt, to .
p (, 1 ., 5 ., 10 ., 15 ., 30 ., 1 , 1 , 1 , 1 )
e ; .txt .csv
dtf (1 , 2 , 3 , 4 //, 5 //)
tmf (1 , 2 , 3 : : , 4 : )
MSOR (0 , 1 )
mstimever ( mstimever=0; mstime='on', mstimever='1')
sep (1 (,), 2 (.), 3 (;), 4 (), 5 ( ))
sep2 (1 , 2 (.), 3 (,), 4 ( ), 5 ('))
datf (#1 TICKER, PER, DATE, TIME, OPEN, HIGH, LOW, CLOSE, VOL; #2 TICKER, PER, DATE, TIME, OPEN, HIGH, LOW, CLOSE; #3 TICKER, PER, DATE, TIME, CLOSE, VOL; #4 TICKER, PER, DATE, TIME, CLOSE; #5 DATE, TIME, OPEN, HIGH, LOW, CLOSE, VOL; #6 DATE, TIME, LAST, VOL, ID, OPER).
at (0 , 1 )

, , , . Polymetal.

# -*- coding: utf-8 -*-
"""
Created on Sat Jun 24 01:46:38 2017

@author: optimusqp
"""
import urllib


code='POLY';
e='.txt';
market='1'
em='175924';
e='.txt';
p='3';
yf='2017';
yt='2017';
month_start='05';
day_start='20';
month_end='06';
day_end='20';
dtf='1';
tmf='1';
MSOR='1';
mstimever='0'
sep='1';
sep2='3';
datf='1';
at='1';


year_start=yf[2:];
year_end=yt[2:];
mf=(int(month_start.replace('0','')))-1;
mt=(int(month_end.replace('0','')))-1;
df=(int(day_start.replace('0','')))-1;
dt=(int(day_end.replace('0','')))-1;


def quotes(code,year_start,month_start,day_start,year_end,month_end,day_end,e,market,em,df,mf,yf,dt,mt,yt,p,dtf,tmf,MSOR,mstimever,sep,sep2,datf,at):
    
    page = urllib.urlopen('http://export.finam.ru/'+str(code)+'_'+str(year_start)+str(month_start)+str(day_start)+'_'+str(year_end)+str(month_end)+str(day_end)+str(e)+'?market='+str(market)+'&em='+str(em)+'&code='+str(code)+'&apply=0&df='+str(df)+'&mf='+str(mf)+'&yf='+str(yf)+'&from='+str(day_start)+'.'+str(month_start)+'.'+str(yf)+'&dt='+str(dt)+'&mt='+str(mt)+'&yt='+str(yt)+'&to='+str(day_end)+'.'+str(month_end)+'.'+str(yt)+'&p='+str(p)+'&f='+str(code)+'_'+str(year_start)+str(month_start)+str(day_start)+'_'+str(year_end)+str(month_end)+str(day_end)+'&e='+str(e)+'&cn='+str(code)+'&dtf='+str(dtf)+'&tmf='+str(tmf)+'&MSOR='+str(MSOR)+'&mstimever='+str(mstimever)+'&sep='+str(sep)+'&sep2='+str(sep2)+'&datf='+str(datf)+'&at='+str(at))
    f = open("company_quotes.txt", "w")
    content = page.read()
    f.write(content)
    f.close()

qq = quotes(code,year_start,month_start,day_start,year_end,month_end,day_end,e,market,em,df,mf,yf,dt,mt,yt,p,dtf,tmf,MSOR,mstimever,sep,sep2,datf,at)

.

? . , , 6131 . function_parameters.csv , , . , , , -.

, , . , ̻ !
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/332700/

:  

: [1] []
 

:
: 

: ( )

:

  URL