습작 및 R&D

curl 을 이용해서 웹페이지 euc-kr을 utf-8 로 변환하는 커맨드 입니다.

empty1234 2019. 10. 21. 22:43

보니까 curl 을 활용하면 간단한 http request 는 가능하네요.

curl -H "Content-Type: application/x-www-form-urlencoded" --data "marketindexCd=FX_USDKRW" https://finance.naver.com/marketindex/exchangeDetail.nhn | iconv -f euc-kr -t utf-8

iconv 의 from 옵션과 to 옵션의 줄임말 같습니다.

감사합니다.