html
html copied to clipboard
Hi, Can not work on gb2312
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
maybe utf8.decode works