html icon indicating copy to clipboard operation
html copied to clipboard

Hi, Can not work on gb2312

Open badboy-tian opened this issue 6 years ago • 1 comments

Please help, thanks

 const url = "http://www.ysts8.com/index_hot.html";
    var response = await get(url, headers: Utils.header);

    var html = parse(response.body, encoding: "gb2312");
    var tipsRoot = html.querySelector("div.pingshu_ysts8_i");
    var items = tipsRoot.querySelectorAll("li.qx");
    items.forEach((f) {
      print(f.text);
    });

dependencies

http: ^0.11.3+16
html: any

image

badboy-tian avatar Jun 13 '18 09:06 badboy-tian

maybe utf8.decode works

liugangnhm avatar Jun 10 '19 06:06 liugangnhm