https://www.youtube.com/watch?v=k4M_dO35JFU&t=326s
================================================================================
F12: dev tool
Network tab: capture stream from IO
================================================================================
Request URL: URL which you request to
Request Methods: GET
Query String parameters: attatched variables with request
================================================================================
Setting URL and Query String
r=requests.get(gen_req_url,query_str_params)
================================================================================
request.post()
================================================================================
df=pd.read_excel(BytesIO(r.content))
df["deal_date"]=20190101
file_dir="/home/young"
file_name="/xxx.xlsx"
df.to_excel(file_dir+file_name,index=False,index_label=None)
================================================================================
request: url+querystring+header
gen_req_url='http://file.krx.co.kr/download.jspx'
headers={
'Referer':'http://marketdata.krx.co.kr/mdi'
}
form_data={
'code':r.content
}
r=requests.post(gen_req_url,form_data,headers=headers)