I am trying to crawl a web site with got library.
I write a simple code.
import got from 'got';
async function test(){
const data = await got('https://dhlottery.co.kr/store.do?method=topStore&pageGubun=L645', { encoding: 'utf8'});
console.log(data.body);
}
test();
it works, but it doesn't show Korean words properly.
some part of the output is here.
<div class="foot_txt2">
<p>Copyright (c) 2018 ��������ȸ&���ູ��. All rights reserved</p>
<p>�� Ȩ�������� �Խõ� �̸��� �ּҰ� �ڵ� �����Ǵ� ���� �ź��ϸ�, �̸� ���ݽ� ������Ÿ����� ���� ó������ �����Ͽ� �ֽñ� �ٶ��ϴ�.</p>
<p class="f_blue2">û�ҳ��� ������ �����ϰų� ��÷���� ������ �� �����ϴ�.</p>
</div>
All crashed words are Korean.
I just want to know why this happens, and how can I solve it.