html icon indicating copy to clipboard operation
html copied to clipboard

Invalid value

Open pkphone opened this issue 2 years ago • 0 comments

Invalid value: Valid value range is empty: 0 when i parse this website https://www.set.or.th/th/home below is the code:

Future<Response> _initiate(String url) async {
    Response response = await get(Uri.parse(url));
    return response;
}

_initiate('https://www.set.or.th/th/home').then((response) {
      var document = parse(response.body);
      var set = document
          .getElementsByClassName('home-market-update')[0]
          .children[0]
          .children[0]
          .children[1]
          .children[0];

      debugPrint(set.text.trim());
});

pkphone avatar Jul 12 '22 16:07 pkphone